Today's Question:  What does your personal desk look like?        GIVE A SHOUT

Hacking Vs. Programming

  Alfred Thompson        2012-04-23 06:09:24       43,500        21    

What is the difference between Hacking and programming? One opinion I have heard expressed is that a hacker can put a lot of code together in a hurry but if a change is needed the code has to be completely rewritten. A programmer may take a little longer but if changes are needed they are more quickly and easily installed without the need for a complete rewrite. One source I heard attributed an observation like this to Maggie Johnson of Google. It rings true to me though. Hacking is usually described as “quick and dirty.” You though a bunch of code together and make it up as you go along. Some hackers are quite brilliant and can do amazing things in incredibly short periods of time. And then they move to the next thing. Or perhaps they stay with the same thing because no one else can understand it well enough to fix it, modify it or improve it. Job security? Perhaps but not a good thing for the people who use, or importantly pay for, the software.

I do a little hacking – that is to say toss something together in a short period of time without a lot of planning – from time to time. I’m not a genius though and typically this ends poorly. The performance is poor, the maintainability is poor, and no one else wants to use it. This may make be biased against this way of doing things I guess. I prefer to program – to think things out, to plan, to proceed in an organized fashion. I saw the difference made clear to me my first year of teaching (a long time ago). I was working on a little game programming of my own and decided to show it to some of my students. As I explained how I had set things up around a number of constants that is hoped would make the program more easily expandable one of the students turned to another and said “Look at that. He’s just starting and already he is planning for additions.” That is one of the real keys, in my opinion, to real programming.

I was a major in Systems Analysis in college. This was during a time when computer science majors were rare and software engineering majors rarer still. But one of the things my professors drilled into our heads was that programs had to be maintainable and extensible. We were taught from day one that programs are not finished but, in a sense, abandoned. More likely at some point you declare victory and more on. But others will maintain these programs and expand them and adapt them. Making their lives easier is a good thing. Think of the Golden Rule – program was you would want the programmers whose code you are modifying to have programmed. I think that is how it is written. Smile

The hackers get a lot of attention these days. These are the basketball players who make the slam dunk that makes it to the highlight reel. But basketball games are won by teams of players executing on the basics – the solid play well executed, the dribble, the layup, the pass that gets the ball to the star. In the long run we need more real programmers to make solid, dependable programs that don’t have be be rewritten from scratch when a change is needed.

Author : Source : http://blogs.msdn.com/b/alfredth/archive/2011/07/27/hacking-vs-programming.aspx

PROGRAMMING  CODING STYLE  HACKING 

Share on Facebook  Share on Twitter  Share on Weibo  Share on Reddit 

  RELATED


  21 COMMENTS


Anjum Rizwi [Reply]@ 2012-04-27 01:51:35
I agree with thought.
Eddy [Reply]@ 2012-04-27 02:10:35
Find the real definition and background here. http://en.wikipedia.org/wiki/Hacker_%28programmer_subculture%29
RKett [Reply]@ 2012-04-27 09:10:58
This wikipedia definition is the second definition which you younger folks attached to the term. The original use of "hacker" described as the author states, a programmer who just jots down code without thinking it through. This definition was in use in the '70's, before most of you were born.
MCMinton [Reply]@ 2012-04-27 17:19:03
You realize you have to accept change as the world moves forward? Just as cool doesn't refer to temperature despite its original meaning so to has the term hacker changed.
Kitty [Reply]@ 2012-04-28 15:36:30
Either usage is legit. Does jewish refer to a religion or an ethnicity? I suppose it depends on which is most convenient for your argument ; ). Stop being pedants, nothing makes you make you look like an ass more than ignoring obviously contextual clues.
Samx [Reply]@ 2013-09-18 03:43:53
@Kitty 

It depends on what that perticular person is thinking...ryt?

Flick [Reply]@ 2012-05-07 18:44:36
I've always believed the term went back before the advent of the computer. A non-professional woodworker, for example. Someone who can put more devotion and love into what they were hacking out of a piece of wood, than a professional could afford to give. And often, someone who could not afford professional tools. When computers arrived, and especially microcomputers, you had people trying to make small computers do things that only mainframes were supposed to be capable of. Unix and C were developed on a PDP-7 instead of a 36-bit mainframe, and perhaps for fun rather than for money; both of these features would make the developers hackers imho. And Gates was a mighty masterful hacker, at least from the "inadequate tools" idea, because any sort of programming language running on an Altair 8800 is clearly squeezing a quart of blood out of a pint turnip.
Jack [Reply]@ 2012-04-27 04:16:09
Good article.
Mokon [Reply]@ 2012-04-27 09:14:01
I disagree with this article very vehemently. Someone who is a hacker in the good sense of the word is not someone who writes un-maintainable code. In fact a true hacker writes very well designed code even if they do it in an agile mindset. Hacking has much more to do with having a passion for programming. Its someone who stays up until 5 in the morning just to get that cool new cache system working.
RKett [Reply]@ 2012-04-27 09:16:12
Mokon, see my reply to Eddy.
Vahag [Reply]@ 2012-04-27 10:28:45
Nice article :) I agree with you.
Eric [Reply]@ 2012-04-27 11:38:36
The problem with the term hacking is that it doesn't have a clear definition. Hacking to me has always been throwing something together in a haphazard way with no understanding of how a system should be designed or architected. To me what you have described is not hacking but prototyping or perhaps even "punting". Someone might disagree with me but again it comes down to a term that doesn't have a clear definition. Even looking up the term on Google doesn't give a solid definition. That's why I like the term prototyping, but even when you prototype you should write your code in a structured manner ... use TDD, no 400 line methods, keep your objects small and single purposed ... in other words write SOLID code. That's my 1.5 cents (IMO it isn't work 2 cents :)).
Abdelalim [Reply]@ 2012-04-27 12:00:57
When I remember what I used to think hacking is when I was a little younger I lough on myself because I had the idea that hacking is “hacking-in” meaning breaking into some one’s computer and do stuff… But the meaning I have now is more like what you said; getting things working by any means necessary and I also agree with the last post of “(bob@the-webweaver.com)” that we use hacking to test our ideas and see if things seem to work and then refine our job, which means that being a programmer means that you’re a hacker. Thanks for the post.
Guru [Reply]@ 2012-04-27 13:05:05
The public understanding of hacking is just like breaking into someones system and steal their database or their files. But that is one kind of hacking. Hackers are 2 kinds. One is black hat hackers and one is white hat hackers. The name itself defines who is who? Although in business if your company's network is down and you are loosing lots of money you don't prefer to call a programmer to write a bunch of codes, you prefer someone who do to magic and get your network up and running. There comes the hackers in picture. Hacking doesn't always mean programming its more complicated then that. It means to find more alternative ways to solve the issue. Let say your VLC player is not working because it is missing some dll or some other file. What a programmer will do is just uninstall it and reinstall it. But a hacker mind will try to find our the file name, search over the internet, download that file and put that file in its folder. This is just a very basic way to explain what exactly hacking means. There are more aspect but I though just to explain very basic hacking method.
chandra [Reply]@ 2012-04-27 13:23:21
here are good comments on hacking and programming . hackers mind always works fast to find the problem or loopholes . but he couldn't write hundreds of lines of programming code with patience. hacker is like quick fix .he always want to know more more and experiment on it .hacker can be a programmer but not every programmer can't be hacker . hackers mindset is always want to know something new on computers . while programmers code work hard for hours .MY personal opinion is without hackers in this www OS developers never go for new upgrades and fixes ( like service packs etc) .hackers works only on his will .he enjoys learning doing new things but I always never support the people who do hacking and stealing data of others . it's really bad . In my sight google search engine is big hacker it crawls all www pages and files .. but it serves everyone ( " knowledge is universal " ) .
Guru [Reply]@ 2012-04-27 13:31:33
I disagree with your statement which says a programmer can not be a hacker. The issue here is a programmer don't want to be a hacker because he is already paid for programming. Although most of the hackers do hacking by their own and there is not a single company that I know release a post which says "Wanted Hackers". Its always been "wanted programmers" for this and that. If companies starts jobs for hackers I am sure many people will come out of the closet and you will get better results. However if a programmer can always be a hacker but they don't because still the word hacking scares people a lot.
chandra [Reply]@ 2012-04-27 13:42:17
At my knowledge companies are recruiting hackers on the name of security professionals. like ethical hackers ( white hat ) or what ever .what i believe is hackers are enthusiasts and born hacker . so every programmer may not be have skills as hackers does .
Justin [Reply]@ 2012-04-27 14:04:27
I think there needs to be a balance. Sometimes all that is needed is a proof of concept or prototype and that should not take a long time to build because you have to design it all up front. Sometimes I decide to have a good overall design, throw together something that works, and then refactor once it works in order to make the code maintainable and clean. It's much easier to refactor code that's already been written as opposed to trying to do it perfectly the first time.
Philip Oakley [Reply]@ 2012-04-27 14:20:22
There are also programmers who hack, and hackers who programme to further confuse the analysis.
Ken [Reply]@ 2012-04-27 15:07:50
Some of the things I just read, I'd also read well before 4 days ago. One definition of a hacker is a thief. Did you hack this article? Or just recycled it? For someone who takes care and pride in their work: "You though a bunch of code...", "You throw..."? "This may make be biased...", "...me biased..."? or "This may be biased..."? "– program was you would want..", "– program like you would want.."?
Skadric [Reply]@ 2012-04-29 22:32:23
No se porque ninguno habló de Linux, al hablar de este tema!! Un hacker no es un delincuente... Si al menos leyeran un poco de lo que es Linux y como empezó y quienes son los que están ayudando a programarlo no dirían que los hacker son personas que no son capases de editar un código sin reescribirlo, si fuera así, Linux y ninguna de sus aplicaciones sacaran actualizaciones http://www.catb.org/~esr/faqs/hacker-howto.html La definición correcta de un hacker, no es mas que una persona que le gusta aprender mas de lo que la mayoría se conforma con saben, y es un error pensar, que los hackers solo son personas que saber penetrar un sistema, eso es solo una parte, que es la mas llamativa, pero lo que en realidad son los hackers, son programadores que ayudan que la informática sea cada ves mejor, y como dije antes, tenemos el vivo ejemplo de Linux.