Mikkel's Blog

Feb 03

The Crazy Ones

Here’s to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes.

The ones who see things differently. They’re not fond of rules. And they have no respect for the status quo. You can quote them, disagree with them, glorify or vilify them.

About the only thing you can’t do is ignore them. Because they change things. They invent. They imagine. They heal. They explore. They create. They inspire. They push the human race forward.

Maybe they have to be crazy.

How else can you stare at an empty canvas and see a work of art? Or sit in silence and hear a song that’s never been written? Or gaze at a red planet and see a laboratory on wheels?

We make tools for these kinds of people.

While some see them as the crazy ones, we see genius. Because the people who are crazy enough to think they can change the world, are the ones who do.

Jan 18

I am so Grateful EU

It has come to my attention that one can’t browse the web without facing annoying “cookie policy” pop-ups. The websites have created these pop-up warnings in order to comply with the “new” EU cookie law. This has led to epidemic tendencies for European-based websites.

I can’t remember how we used to browse the web without have to close a pop-up warning about cookies on every website we visit.

image

image

Jan 11

Learning C

My process of learning C has been somewhat like this, summed up in 6 bulletpoints.

I know that C isn’t for everyone, but if you try hard and still can’t code C, then the act of trying will make you a better programmer, at least that’s my belief and having been coding C or trying C out for quite some time I have started to fall in love with it - it has, indeed, learned me a lot of qualities of programming, even making my CSS better.

High-level programming languages (such as Python and Ruby) are great for just hacking out ideas, but hack until it works will eventually led to nothing works? C will be harder on you because it requires you to plan out what you’ll create first. Sure, you can hack for a bit, but you have to get serious much earlier in C than other languages. 

Learning C makes you a better programmer because you are forced to deal with these issues earlier and more frequently. You can’t be sloppy and half-assed about what you write or nothing will work. The advantage of C is it’s a simple language you can figure out on your own, which makes it a great language for learning about the machine and getting stronger in these core programmer skills.

C, being a low-level programming language leaves little abstraction from a computer’s instruction set architecture, whereas I feel that C# (for me) has a too strong abstraction from the details of the computer as I would like to actually feel and know what I am doing. 

Its portability is also a factor. I can run my source files from my Ubuntu development computer (saving all the source files on Dropbox) and then compile them on my Macbook Pro on the go. I haven’t tried compiling C on Windows as I have seen no need for that, I might do that later on.

This article, The Unreasonable Effectiveness of C, gives us a lot of insight in to how much better C is for certain things, esp. portability. And the notion that C is a high-level language (is right), but just not as high-level as C# and as Damien Katz say “certainly no where near as high level as Erlang, Python, or Javascript” and it is completely right.

It might take significantly longer time to produce code in C than compared to C#.Net but in the long run C is much more effective because you can much more easily control everything and if somethings goes wrong, you can see it. 

Dec 27

The Tedious Task of Web Development

As I have emerged as a C programmer I began to realise how tedious and boring the task of web development actually is (this is what really made me want to learn C, to get less abstraction from the machine itself). There is virtually nothing new to web development, the same goes to C#.Net where you kind of just need to add 3 components and you have a fully working business program. This can be a good thing one many levels. 

This is not to underestimate the power of C#.Net as I have discovered how powerful it really is, it is like VB.Net, but more powerful. You can get so much done in so short time. This led me to think of how to approach my coding evolution. I want to keep learning things, but it shouldn’t be a waste of time (it rarely is learning a new language). I consider myself an engineer (or a forthcoming engineer) - therefore I will not stick with one language I want to learn multiple languages in order to make me pick languages up in no time in the future. In these times it would be a waste of time to learn an Assembly language as it is too narrow. C is a good, fast, reliable (if you manage it correctly) language, therefore it is the key to all the backend work of application and then you would create a front-end application using C#.Net where the speed ideally doesn’t matter that much and you can get things done with just the use of three components.  

I hope you enjoy the festive season!

Dec 06

1999

“Monkey stands for honesty, giraffes are insincere”

A lot of stuff is going on around me. While I found C#.Net easy to pick up and learn a year or two back, I am experiencing an increasing amount of frustration with regards to C. I am avidly trying to comprehend all the incomprehensible concepts of C, to your surprise frustration is the key here. It makes me want to understand this even more. I am starting to get the hang of it. One of the factors of why I haven’t been blogging much lately is because of the increasing workload with regards to researching and learning C. Not only do I spend time on coding and reading books (namely: C Programming Language (2nd Edition) doing every possible exercise) about it, I am also looking up every possible library, function in order to increase my understanding of the language and its uses.

Having dealt with only high-level-programming languages and garbage collecting fuckers before, I find the idea of heap and stack allocation surprisingly easy to grasp. Pointers aren’t strangers to me either so everything is running perfectly. I have yet to find the goal with me learning C however, it stems from the notion of Daniel P. Friedman: “thinking about computing is one of the most exciting things the human mind can do.” To this day I can’t agree more.

I am also growing and increased fondness of the Ubuntu operating system as this is the only OS I am using, apart from MacOSX on my MacBook Pro, even though I have Windows 7 installed. I am feeling comfortable with Linux and also as this is the perfect environment for developing C applications, whereas checking e-mail is reserved to the Mail.app application on my MacBook - everything else can be done with my 27” screen and hard working desktop computer. 

Nov 06

Next Exit

My developing with regards to my Raspberry Pi has reached a plateau people might want to call it. It is not so much for the lack of ideas, more lack of time - it has been a busy week. I however intend to do something relatively cool with my Pi and with C.

On a further note I “accomplished” to port my Ping application to my Raspberry Pi it was easy, it literally only took 10 minutes, one could call this my first mulit-platform application. Isn’t that nice? 

I mentioned my dilemma of what case to my Raspberry Pi I should buy, I decided on this sexy black-stealth case (which turned out very expensive (unforeseen postage and shipping costs), but I’ve got more money than sense) in addition I bought a USB hub (I thought I had one somewhere but I could find it, so I bought this neat little thing) I will get this within 8 days, so before the 14th.  

I just noticed that the Microsoft Surface RT is merely a flipped laptop, meaning that the fat side is the screen and not the keyboard.

Nov 01

Productivity Strikes Once Again

I have 35 minutes until I will be unproductive again, I have just finished a history assignment which seemed rather like a big task, but ended up with having it done within the timespan - which left me 35 minutes, now that’s a good thing. Undisturbed in 35 minutes. I would have fished that I had taken my Raspberry Pi with me to school (unfortunately I haven’t bought a case yet nor do I have a battery pack which I am eager to buy - it would be Pi on the run). 

The thing is however I have set up (port-forwarding and such) ssh accessibility with my Raspberry Pi, there’s just a problem with this, my school does not allow me to establish ssh connections, more precisely using port 22. This means when I am establishing a ssh connection to my Raspberry Pi I will have to use the personal hotspot on my iPhone 5. Because of this I am looking for an alternative which would be a VPN server situated at my home address (as it would make no sense for me to use a virtual private server located in Germany, as that’s the only one I have got, would be too slow) I had hoped that I could have used my Time Capsule but I have no intention of jailbreaking it or rooting it as Android fanboys would call it. This means that I probably would use an old Linux computer for this (as I will not do it with my Pi or my regular desktop computer). I need a solution to this problem. The easiest thing would be to use my 3G hotspot of course, but what’s the fun in that? 

Another thing I need to do with my port-forwarding is to make VNC available for remote connectivity as when I am coding on my Raspberry Pi nano doesn’t do the trick for me I may have to do something about that, but that shouldn’t be a biggie to be honest. 

The biggest problem is of course what color my Raspberry Pi case should be?

Oct 24

Raspberry Pi: Arrived

So yesterday I unpacked my Raspberry Pi and today I wrote and compiled the first C program for it, and I did it over ssh - so currently I am doing all the work from my Macbook Pro as I need a hdmi to vga cable (as I do not want to use my 27” screen for it). Here’s a neat picture of the console over ssh: 

It was quite a delayed the arrival so I got an email when they dispatched it which said 

If you ordered a Raspberry Pi board as part of your order we are pleased to inform you that we have sent you the upgraded 512MB Revision 2 board to thank you for your continued patience.

So instead of 256MB of memory I have now got, free of charge, 512MB of memory.

When I said that I compiled my first C program, you probably wondered why it wasn’t C# when I have been preaching that for a while, the reason is that I have decided it was too high-level-programming too much abstraction from what’s actually going on in the computer.

Learning C

I know that C isn’t for everyone, but if you try hard and still can’t code C, then the act of trying will make you a better programmer.

High-level programming languages are great for just hacking out ideas, but have you noticed that if you keep doing “hack until it works” eventually nothing works? C will be harder on you because it requires you to plan out what you’ll create first. Sure, you can hack for a bit, but you have to get serious much earlier in C than other languages. 

Learning C makes you a better programmer because you are forced to deal with these issues earlier and more frequently. You can’t be sloppy and half-assed about what you write or nothing will work. The advantage of C is it’s a simple language you can figure out on your own, which makes it a great language for learning about the machine and getting stronger in these core programmer skills. C, being a low-level programming language leaves little abstraction from a computer’s instruction set architecture, whereas I feel that C# (for me) has a too strong abstraction from the details of the computer as I would like to actually feel what I am doing in more detail. 

I am currently compiling from the Terminal as I think that one is improving ones skills by not using and IDE (other than a text-editor, which is nano when I am on the Raspberry Pi and TextMate (as I have been using that since forever for web-programming). I think this is quite permanent at least for now - you have to have put more detail and attention into your programming and I am adjusting to using valgrind and make which seems to be getting easier and easier to read and to deal with as the time moves on.  

Oct 21

“Whatever I have up till now accepted as most true and assured I have gotten either from the senses or through the senses. But from time to time I have found that the senses deceive, and it is prudent never to trust completely those who have deceived us even once.” — Rene Descartes, Meditations On First Philosophy

Oct 17

Getting Ready: Raspberry Pi Arrival

I am on a spring break at the moment, so I have plenty of time to do some …. research work (now that I can’t do any experimental work, due to lack of equipment) also I need something to take my mind away, so it’s good.  

OS Considerations 

I haven’t decided solely on one operating system, but my current conviction is with Arch Linux ARM, at first I was moving towards Raspbian, but I am this optimization freak - I want it to be as fast as possible. I would rather have full control over it, rather than have loads of pre-compiled programs ready to install on to it. I am not a snob, I just want it to work the way that I want it.

What to do with it?

This will probably be what I will be using my first Raspberry Pi to. A media center, instead of using my MacBook Pro to watch movies on my television screen. On a further note I can tell you that I will be purchasing one of those new sexy 512MB RAM Raspberry Pis, which I will use for development purposes.  
Yes of course, no matter what. That’s gonna happen, this will obviously allow me to do something with it on the run.
Yes. This would a cornerstone for me in order for me to transfer movies, series and such - it would allow the Raspberry Pi to be a complete seperate unit which I would need no access to or whatsoever (I think I have a storage problem, but I will talk about that later in this blog post.
Would be stupid, waste of time. Unless I could make some web-management (or download something, maybe code it haven’t tried anything like that before, it would be cool - maybe a list of all the movies/series that I have got and then when you click it, it would play it on the Raspberry Pi (but that’s what I have XBMC for, isn’t it? I could use an API from them (maybe create an add-on, if they allow that or whatchamacallit) and then use the library’s setup. I will have to look into that - I have no knowledge of XBMC, so I am just throwing ideas out in the blue - ramblings one might be tempted to call it)

Problem: Storage

At the moment I have around 170GB of movies on my MacBook Pro and with a 4GB sd card I face a problem. I could use an external device, such as portable USB storage, but I think that solution is a bit dodgy, abandoning the principle of a credit-card-area-media-center. I don’t want to stream my movies, even though I could use my, currently unused other than hotspot, TimeCapsule. I will have to look further into this issue.