Live data from Hacker News

Ask HN: Where's the fun in programming?

news.ycombinator.com

41–50 of 73 posts

Re: Ask HN: Where's the fun in programming?

#41

Earlier quoted context omitted.

What language would you recommend to be the most fun to work with? Whats the best way for a beginner to learn that (I know by practice, but which books, websites, tutorials, and in what order) ?

Python is a great language to learn and work with: http://docs.python.org/tutorial/

The reasons Python is so appealing to me are numerous, but the primary ones are (1) Django (2) script based (like PHP, no waiting for compilation) (3) easy to scan (no need for {} and everything is nicely nested)

It's good, clean fun if you ask me. Just the other day I even wrote a script to listen in on my sound card and emit an unpleasant 20k tone when my dog barked. That kind of programming is what you call fun!

Re: Ask HN: Where's the fun in programming?

#43

Earlier quoted context omitted.

Yeah HTML/CSS/Javascript and PHP are some of the worst possible examples of "coding". I was forced to use PHP on a recent project and I felt like tearing my eyes out it was that bad and immature compared to other methods. It was like telling a formula one driver they have to drive through peak hour in a rundown 1970s ford and then asking if they like driving.

What language would you recommend to be the most fun to work with? Whats the best way for a beginner to learn that (I know by practice, but which books, websites, tutorials, and in what order) ?

Python web development and ruby on rails are very rewarding in how quick they get things done. Might check that out.

Re: Ask HN: Where's the fun in programming?

#44
post #30

Earlier quoted context omitted.

Yeah HTML/CSS/Javascript and PHP are some of the worst possible examples of "coding". I was forced to use PHP on a recent project and I felt like tearing my eyes out it was that bad and immature compared to other methods. It was like telling a formula one driver they have to drive through peak hour in a rundown 1970s ford and then asking if they like driving.

I just quit a job where I was mostly doing BASIC, but I got to do a bit of PHP here and there. PHP is more like driving a modern automatic. No, it's not as fun as a six-speed, but it is fairly relaxing. BASIC, now that's like a rundown 1970s Ford.

PHP is more like driving a "restored" late 80's car today still. It ended up doing vastly more than it was designed to.

Don't get me wrong, it's still very useful, but it ends up not being as clean as python or ruby when made for most cases.

But in the end case, it does end up being a product of who is using the language.

It was designed to be a quick and dirty home page language, and still has lots of warts from that.

Re: Ask HN: Where's the fun in programming?

#45
post #5

>Can anyone passionate about coding tell me where the fun is in coding? You're doing a very unfun form of coding. IMO. HTML/CSS/Javascript and many uses of php are about the equivalent of finishing a kitchen off in a home. Other forms of coding are like building the Eiffel Tower. You may wish to try outsourcing the coding portions and taking on more volume.

Yeah HTML/CSS/Javascript and PHP are some of the worst possible examples of "coding". I was forced to use PHP on a recent project and I felt like tearing my eyes out it was that bad and immature compared to other methods. It was like telling a formula one driver they have to drive through peak hour in a rundown 1970s ford and then asking if they like driving.

I don't do a lot of web development and I hated php too a year or so ago.

But it's actually not so bad if you just want some things done and for me I actually started to enjoy sporadic encounters with it. I switched from my own hacked soup to kohana and I found jquery and them alone made it much better.

And I think you're missing context a little, I think javascript is a wonderful language and you can do a lot of "real coding" with it. I guess you mean this stereotypical, boring, web development which I agree is extremely loathsome.

Re: Ask HN: Where's the fun in programming?

#46
I do a lot of coding. Hours and Hours a day. A lot of that coding is for other people. I like coding, but there is something else I like. I like when people receive my code, take a look at it, and say "Wow. Erm. Thanks."

I like being appreciated.

I like thinking about how I am going to code something, and then doing it in an efficient algorithm; I like feeling as if I did something clever. I also like how I view everything in life differently because coding is a huge part of it.

The other day someone asked why I always respond to their texts 'no matter what,' and I said, 'well, people with a friendship level of 1 or higher always get a response.' They asked me to give them my friendship levels, so I had to make up a system on the spot- I said 'lowest should be (-2), wait no- (-1) so I can use bitwise operators,' and then structured the system around the use of bitwise operators just because I thought it was cute.

The fun in coding is the same fun that you receive in web design, however, I like to think that coding gives me more pleasure in more areas because I can use concepts I learn in everyday use, like ranking friends.

Re: Ask HN: Where's the fun in programming?

#47
post #45

Earlier quoted context omitted.

Yeah HTML/CSS/Javascript and PHP are some of the worst possible examples of "coding". I was forced to use PHP on a recent project and I felt like tearing my eyes out it was that bad and immature compared to other methods. It was like telling a formula one driver they have to drive through peak hour in a rundown 1970s ford and then asking if they like driving.

I don't do a lot of web development and I hated php too a year or so ago. But it's actually not so bad if you just want some things done and for me I actually started to enjoy sporadic encounters with it. I switched from my own hacked soup to kohana and I found jquery and them alone made it much better. And I think you're missing context a little, I think javascript is a wonderful language and you can do a lot of "re…

I think javascript is fine when you don't actually have to support a dozen different browsers. But for most use cases, you have way to much cross platform support to worry about, and that's no fun.

Php is fine when there is less than 100 lines of it or so in your project. It just gets unfun fast as the LOC goes up.

Re: Ask HN: Where's the fun in programming?

#49
Hum, I can't tell why coding is fun. I can however tell why I have so much fun developing my current project.

The project is a compiler to produce serialization and deserialization classes from a datatype description.

I have a lot of fun, because of the following things at the moment:

Sometimes, code approaches a level where the code itself is either clear beyond anything or where the code actually teaches you something about the problem you are solving. For example, in an abstraction of access paths through C datastructures (something like foo.bar->baz), my constructor calls for the various "steps" on the path look like: super(previousPath, "->", accessedMember). This makes me happy, because it is just so clear. You take the path until now, put a -> after it and put the accessed member after that to get the new path. Or, in other words: super(previousPath, "->", accessedMember).

In other parts, I put up some work to get fluent interfaces and internal domain dependant languages going. Parts of the code suddenly look like: BeginWithDerivingSerialiser().andThen(padToByteAligned).andThen(minimizeDuplication).andFinallyEmit(C89) or in another part: return CompositeHash().whichDependsOn(members).andOn(name).andNothingElse().

These little things, coupled with the knowledge what hassle this was before these little DSLs makes me smile everytime :)

Furthermore, my little compiler is growing in visible steps. I have adopted an iterative development style by now. That means, I know inputs for my compiler which are not handled properly yet, and I know what I need to solve to be able to handle this type. From this knowledge, I can pick certain inputs to solve which require a bit more infrastructure to work. On the other hand, once I implement the next input, it is really fun to do so, because I see: This works, that works, I dont need to care about that, because this abstraction does that for me and so on and so on. This is fun, because I can see how a previously large problem shrinks in simple 1-2 day steps until it it is easy to solve and then I solve it and my compiler is stronger now :)

Third, as you said, code is a fun puzzle. Solving the issues at hand is just the first step. Sometimes it is complicated and you need to think a day about the problem, sometimes an algorithm is just known. But after that, nudging and shifting the code until it looks and feels really lean and elegant is very, very interesting. Maybe extracting this into a method works? Maybe turning these loops the other way works? Maybe inverting that if makes it nicer? Who knows! Lets try! Maybe it will become one of thos masterpieces :)

Post reply on HN