Hi and welcome to my personal page where I'll post about my games, projects and other stuff in my life.

Or visit the Big Archive

March 18, 2012

Beginning Programming

I read a wonderful post, 3 Things I hate about “beginner” programming books, which I couldn't agree more with. Basically he has these points:

  1. Too long
  2. Too many examples like "Hello World!"
  3. No answers to exercises.

Nr 1 is a pretty curious one. Even though I think a book is good, I often end up only completing 75-85% of it before going on with my own projects or with something else. Also the best books are often shorter than your average 700+ pages brick. Modern Perl, The Pragmatic Programmer and Effective C++ are all short but really good.

I always hate, really hate, when I can't find an answer to an exercise in a book. Often I'm unsure or I frankly don't know how to solve something, even after reading the text and examples, and I also think I learn best by copying. This may sound strange to you but I swear it's true. When I made my first game I copied from a tutorial and after I changed and wrote something new. This is also the same when doing math, first I want too see examples and how to actually solve something then I copy that and then I go "hmm what does this do, what will happen here".

The small constructed examples you always see, "this Vehicle is a class and the Firetruck inherits Vehicle", are no use at all I'd say. Is that how you solve a problem? Is that how you program? Not really. Almost all examples are contrived and not useful at all, especially for beginners. I never thought classes where good before I copied a solution to some problem I had. Wonderful!

This is what I'd do if I would write a "beginner" programming book:

  1. I would use the whole book to construct a game. I would begin with simply drawing a shape, or an image, on the screen. Then I would make it move and at the end of the book I would have all the necessary code for a complete and functional game.
  2. I would provide all the code inside the book. Of course I could provide it online but the act of actually typing in something yourself is very valuable.
  3. It should be fun and easy-going. I wouldn't focus on every little detail but instead on the big picture and my goal would be to get the reader hooked on programming.

That's it! Learning programming is hard, but it's also very satisfying. My summer project will be to teach my little brother to program, we'll see how that'll go.

Posted by Jonas Hietala in Learning Programming | Comments(0)

March 4, 2012

Changes

A lot has been going on lately and it feels like I'm being swamped. I can't complain too much but there are things I'd like to change after the exam period this week.

  1. Program more!
    I have seriously done nothing since christmas or someting. I need to finish:

    1. Ada project for school. Can't believe I still haven't done it.
    2. New web page. Need to track down a good perl hosting service and actually finish the site.
    3. Game for my little brother to create graphics and tweak some code in, I want to teach him to code during the summer! That's a good healthy challange for me.
    4. Ludum Dare 23 in April, yay!

  2. Serious Taekwon-do training.
  3. Don't fall behind too much in school. This time I'm hurrying like mad to catch up before exam and I'm actually worried. This shouldn't happen! I didn't even go to a single lesson this time.

Just wanted to get that out there.

Posted by Jonas Hietala in Life | Comments(0)

February 24, 2012

Favourite Programming Language

All the programmers love to promote their favourite language, or to hate on others. Now I read a post which claimes my favourite language is not good enough! But he's correct of course, there is no one language to rule them all. You should always choose the mest language for the job, be it C or Ruby, but most don't learn enough of them. Maybe he's right, maybe we're all just lazy?

Whatever the reason I certainly have a favourite language, or rather a few. If I would have to name one I would probably say Perl, just because I've had the most fun with it! I do enjoy C++ and as I've made most of my precious games in it that's a good candidate. Haskell is absolutely awesome and so is Lisp. There I've listed 4 favourites! But of course I don't care about that really, I tend to fall in love with most of the languages I use.

Well I don't particulary like Ada... But I do admit it has some nice features, and the error messages are great! But how about Java then? I've been joking around a lot with it but to be honest I don't really hate it. Sure there are better alternatives but there are good points. The JVM, the libraries and the simplicity of it appeals to me. Maybe it's not simple but I'm used to the thinking.

To echo his suggestion: learn new languages. I'll add that don't just learn them: use them for something real and learn to love them! And don't just learn similar languages (from C++ to Java isn't worth it) but try to switch it up a bit (try C++ to Haskell). You'll find you'll be a better programmer when the dust settles, and you can actually choose a language gwith the strengths for a particular prolem.

End rant.

Posted by Jonas Hietala in Programming | Comments(0)

February 24, 2012

Motivation is Valuable

It's funny how motivation can play such a huge role with my productivity. I'm currently having two math courses; one mandatory about analysis in multiple variables and vector analysis and one voluntary about advanced linear algebra. I don't like the analysis course, didn't like the previous ones and I don't like this one.I don't fall asleep on lectures ever and I always try my best to listen but this one is pretty horrible. Not sure if the teacher or the content is to blame?

On the other hand the linear algebra course is fun and intriguing. Every lecture I'm always surprised when it ends "already 2 hours?". This is so funny because I'm not really convinced why this is happening, are the courses or the teachers that different? Sure that's probably true, but mostly I think it's my motivation that's hurting me.

"Linear algebra seems fun! It's hard but I will manage it." vs "Pah analysis again. Damn the first lecture was boring, this course is boring". I do like linear algebra more and I think it'll be much more useful for me in my programming career but analysis isn't so bad, not this degree. I think my motivation blow ups my it into bigger proportions than it really is.

It's pretty bad, we have exam in two weeks and I have literary done nothing in the analysis course... Now I need to study hard if I want to complete it but the lack of motivation is just sooo hard to overcome. Sometimes I think I don't have the mentality to be a good student. Many of my class mates are in school the whole day, every day, while I try to be in school as little as possible.

Posted by Jonas Hietala in Motivation | Comments(0)

February 12, 2012

Doing Stuff

The school and my life is trotting along. I'm handling the extra course fine, but instead I've left the standard math course behind a bit. Actually more than a bit but hopefully I'll correct things later.

No my life is going along just fine, it almost feels like my life is runing ahead and leaving me behind. What have I done lately? School work I guess? Can't think of anything else the last month to be completely honest, which is pretty far from optimal. I set out this school year with the goal of programming a lot more, but so far that has been pretty dead. Sure I made a lot of progress on the new site during the christmas break but since school started I have done nothing, nothing! So sad.

Yesterday I did something else though. I went and bought a bunch of stuff. I bought a birthday present for Veronica which I'm very happy with, and I bought some rubber bands for training the oblique muscles among others. I tried but I couldn't find a protective condom for my new phone, yes I have a new phone! A white, shining, wonderful Samsung Galaxy S2 which is blowing my mind. I can now surf, watch starcraft and read manga in bed, in the bathroom and in school! Yay! And umm... New boxers.

Apart from all that I also hung up Veronica's two paintings and a white shelf I've been meaning to a while. I realized I had no idea whatsoever how to hang up a painting! I bought a big box with screws and stuff but there where only one of them I knew how to use. Now I know how to hang up a painting like the leaning tower of Pisa!

Leaning tower of Pisa
You call that leaning? You should check out my paintings!

I finally got them sort-of straight, but it took a while.

You know your life is running fast if you're savouring hanging up paintings. But now I will do something about that: I will go to Taekwon-do practice and later maybe going to the children's practice, yay!

Posted by Jonas Hietala in Life | Comments(0)

February 2, 2012

A Simple Thought

I wrote that we where doing some microprogramming, making the processor work etc. We had a lab about that yesterday and I was very, very nervous. The preparations weren't that hard, but they where very bothersome. Converting the instructions to binary/hex by hand is never nice. Turns out the lab was very easy! You also had the option to prepare everything before on their simulator, which dumb be didn't do.

When I thought about how to describe what microprogramming is I was going to write that it's what makes a processor work. This sounds a bit off though, couldn't you do the same with physical hardware instead of another programming step inside the processor? Well turns out that's what RISC is all about. Sometimes the qualms you have when facing something new are completely justified.

Posted by Jonas Hietala in Microprogramming | Comments(0)

January 29, 2012

Speeding Ahead

Life is slowly settling down over here. School has started with some pretty interesting stuff this year. Firstly we have a math analysis course in multiple variables which is ok. I'm not a fan of the previous analysis courses but maybe this will be a bit different. We're contining with computer hardware, microprogramming and such, and I enjoy it a little.

When I started programming the big question was how did the code I typed into my editor become something the processor could understand? I've got a good feeling for different programming languages, and now including the assembly for 86k processors. Now the basic hardware, from logical gates to ackumulators, and code are being connected together which feels very nice indeed. I still like to construct and make stuff in a more high level way though.

We're also having a new course, it's been totally remade since last year, about software prototyping. I'm quite used to prototyping with my games but as expected a university course about the subject is a bit more structured and dare I say more boring? The course book, Effective Prototyping for Software Makers, is pretty good as it explains the design process in a formal, but not mindnumbingly boring, way. I need to investigate more but I'll definitely use some of the ideas.

The last course for now is the advanced course in linear algebra which me and a friend chose. Linear algebra was probably the hardest math course we've had but at the same time I think it's the most enjoyable and useful so far. And finally I hear it's very useful for programmers in computation and 3D programming so it's something I really want to understand.

Life with Veronica is also working out, mainly because she's awesome, and I went to a Taekwon-do training this week. Feels good to practice again!

Posted by Jonas Hietala in General | Comments(0)

January 26, 2012

Book Recommendations

Updated January 26, 2012

This is an unordered list of books I like so much I would like to promote them a bit. There are programming books but also fiction and manga.

Programming Books

The Pragmatic Programmer

#2 in the Stackoverflow question "What is the single most influential book every programmer should read?" and that is no joke. I have yet to read the #1 on the list, Code Complete, but so far The Pragmatic Programmer is the best programming book I have ever read.

It does not teach you to program instead it teaches you how to think as a programmer and small tweaks you can do to become more effective and smarter. It's a little hard to explain but in programming it's the small things that matter and you'll get a ton of improvements from this one. Read and re-read!

Modern Perl

One of my favourite programming books. It's not a book that teaches you how to program which practically every other language specific book does. It simply teaches you the Perl programming language in a modern fashion. It's not a cookbook but it contains a lot of "how to do this" which I found extremely helpful.

I read this book when I wanted to learn Perl. I had read the camel book before but I was a bit impatient to appreciate it I guess. Modern Perl is a very thin book, only 250 pages, but it teaches perl so well. If you want to learn Perl but know how to programming, this is clearly the book for you.

Learn You a Haskell For Great Good

A very fun and easy going book but it's also a good introduction to something as hard as Haskell. How do you get those two together? After you've read this one you'll think that's the way to go.

Effective Java, Effective C++, More Effective C++

I'm actually lumping these together but they are individually excellent books for their language. Some argue that these are the best and I would have to agree.

Misc

Design for Hackers

This is a great introductory book about design. Before reading this I thought programmers were superior to designers but that's a very foolish thought. I used to guess how my web page or my game should look like but now I know that there's something called negative space, receding colors and that you can go infinity deep in font design. Now I'm more aware of the difficulties and the thought and work that goes into making something pretty and usable.

I guess it's the case where the more you know, the more you know that you don't know. Consider for example a child lost in the forest. He's hungry so he picks some berries to eat. When you're a bit older you might know that they could be poisoned, but you don't know which ones. Now you're in a dark and scary place and you don't dare to eat anything at all! I used to be the toddler, happy and unknowing, but now I know how much I don't know. It's a refreshing feeling.

Fiction

Song of Ice and Fire

I have never been a big fan of fantasy, for example I didn't care for the bible of fantasy The Lord of the Rings at all. Bilbo, another of Tolkiens books in the saga, was good but that's it for my positive fantasy experience. But that was before I read this series.

Wonderfully dark and engaging, this is not the classic long vinding good vs evil fantasy (Tolkien I'm looking at you). This series is easy to read and very dark. The villains are the best I've ever met and yet (most) are not completely black and you will even start liking or agreeing with some. Fantastic.

Jeffery Deaver

I fell in love with Jeffery Deaver when I read his book A Maiden's Grave about some escaped prisoners who kidnap a school buss full of deaf girls. The situation escalates to a hostage situation with non-stop action. His book The Cold Moon continues the tradition of smart, twisted and entertaining plot. Here the paralyzed csi Lincoln Rhyme hunts a serial killer by analyzing hints and clues, much like in the tv-show but with more detail and excitement. There are almost 10 books in the series of Lincoln Rhyme and they are all very good.

I also want to highlight The Sleeping Doll which focuses on the human aspect of catching killers. Initially not a very appealing idea but this might be his best book of them all.

Posted by Jonas Hietala in Books | Comments(0)