Reading Programming

Jun 26, 2005 22:55 # 36778

Jaz *** throws in his two cents...

How I learned to love static typing

100% | 4

Do you know what bugs me about dynamic languages? There's so much to type! I'm most serious. Having spent the better part of my programming life tinkering with Perl, I found that Java and Eclipse often lets me get away with a lot less typing.

Recently Philippe Ombredanne pointed me to the wonders of Hippie Completion (now "Word Completion" in Eclipse 3.1 lingo). Hippie completion can summoned from any point in your code and rather than making suggestions it just completes whatever you're typing - complete ownage. Once you get the hang of it, coding without Hippie Completion feels a lot like running uphill, in deep snow and your feet tied together.

The ease and speed with which modern IDEs allow you to generate constructors, extract interfaces, delegate behaviour, organize your dependencies and imports, split up spaghetti code into multiple methods and whatnot makes life so much easier. I also like how you can simply use a new class, field or method that does not yet exist and Eclipse will automatically create something suitable.

Don't even get me started about refactoring. When Perl requires to rename a class, variable or method using search and replace I feel like soldering circuit boards with a welding torch. Also when I have to change major parts of my API it's just nice to instantly know what I'm breaking, being able to jump to the problem with a single click and maybe even have Eclipse repair it automatically. For this purpose tests are about the lamest substitute ever.

Should we all be doing Java then? Hell no. The thing with Java et. al. is that it only rewards a single style of coding. Anything other than textbook OOP and the pain just keeps getting worse. My point is that if you find that static typing is slowing you down, take a better look at your tools. When you find yourself typing out pages of code, you're clearly doing something wrong.

'Yeah, That's what Jesus would do. Jesus would bomb Afghanistan. Yeah.' - snowlion

Jun 29, 2005 11:38 # 36862

Martin *** replies...

Right click, open context menu, click "complete program"

92% | 2

Well, I'm really irritated about all those beautiful new features. All those little helpers that create repeating structures for classes, bodies inside functions, auto-completion, interfaces to most sophisticated APIs, all that stuff that makes programming easier... at first glance.

But there is a downside as well. What seems to give you more freedom and time to really concentrate on your core problem, the development of a program, in the long run - and I'm still talking of years here hopefully - in the long run actually pulls you away from what was programming meant to be. In the end programming as we know it today will be a mere Point-and-Click-adventure. You will just combine certain encapsulated pieces of code to create something seemingly new from it. Thats just like using samples of music looping them to a 3 min song, hoping noone else did it that way before. May be you're talented enough to still create a smash-hit, but you'll be using second-hand, pre-chewed code nonetheless.

Does anyone remember how to switch a good old VGA graphics card into mode 13H in assembler and using page-flipping for displaying graphic animations? Sure, I know, those days are over, thank god, but my problem with it is the fact, that the actual gap of knowledge between certain fields of programming is getting larger by the day. Today you're making a function call like "DrawRotatingFlyingSphereEmittingLight(int color, float speed...)" while noone gives a damn anymore, HOW it actually works to bring those colored pixels to the screen.

Dont get me wrong, in a way I'm more than thankful for it. Sure I dont want to assemble a wheel each morning anew before riding my bike. But isn't it kinda useful to know at least HOW its gonna done? The problem is, there ARE still people knowing how to do it and still optimizing it.

And there always will be people building the tools and gadgets and the ones, who are using it, in every field of technics, science and construction. My concern about these lil helper things is, that in the long run application programming will be reduced to just using prefabricated tools. Well, may be its the fear of losing the connection to the interesting parts about programming, the fear of being reduced to a user myself. If you ask me, I'd rather BUILD those lil helpers than using it, just to be on the right side of the fence! Is it just me, or can anyone understand these thoughts as well?

After decades of construction my website is finally up an running: www.kkds.de

Jul 01, 2005 18:24 # 36894

Jaz *** replies...

Re: Right click, open context menu, click "complete program"

95% | 3

When I extract an interface or delegate a dozen methods to another object—which happens about every day—typing it all out by hand doesn't bring me closer to what programming used to mean.

You will just combine certain encapsulated pieces of code to create something seemingly new from it. Thats just like using samples of music looping them to a 3 min song, hoping noone else did it that way before.

There is an unlimited number of ways in which a note can be played on the guitar. There is only one way to draw a white rectangle onto the screen. You can reinvent the method, probably making it slower and more buggy, but the quality of your work won't improve in the slightest.

...the actual gap of knowledge between certain fields of programming is getting larger by the day.

I actually think that the amount of knowledge and experience necessary to be a good developer has totally gone through the roof. Back in the days it was all about getting things to work. Your code either worked or not, was either efficient or not. We've moved beyond getting things to work. Being a good programmer today means being able to contain complexity and churn out code that can survive massive changes on one end without having the effects ripple through the entire system.

I feel that coming up with a good software design is brutally hard, especially because there's not a binary "works" / "works not" anymore. Instead there are a gazillion ways in which your design can suck, of most you are usually not even aware. I also think that if you are concerned about being on the right side of the fence, this is the challenge to tackle.

Programming has always been about solving one problem to build upon the solution, and it's not like we've been running out of challenges only because there's another way of switching graphic modes. Large systems are such a scary mass of complexity right now that I'm not even sure we're winning the battle. Reusable components and more powerful editing tools are merely our quaint attempts to keep the shit from hitting the fan entirely.

'Yeah, That's what Jesus would do. Jesus would bomb Afghanistan. Yeah.' - snowlion

Apr 05, 2007 19:27 # 44371

smashedmotif * replies...

Re: How I learned to love static typing

Feels a lot like running uphill, in deep snow and your feet tied together.

This made me chuckle. As if one running uphill wasn't bad enough.

Reading post with added moments of humor make for fun reading.

What comes around goes around.


Favorites (edit)

Small text Large text

Netalive Amp (Skin for Winamp)