It's an exciting day! Yesterday I figured out how to put code into my blog posts. It's sort of sad that I get excited by something like that, but, hey, I like it! I updated the only post I had with code in it, and I think it's beautiful.
In separate but related news, I finally got myself a github account. Nothing is on there yet, but I have big things in mind for it in the future. Not that big, mind you, but big. My current hope is to sync up my Dropbox and github repositories. What else am I going to do with 11GB of Dropbox storage? Not much else going on in my life, but woo code!
Friday, February 22, 2013
Sunday, February 17, 2013
The C Programming Language
I suppose it was inevitable, but my path into the world of programming has led to to C. C might be the most famous of all programming languages. I can't actually tell you why that is the case, but in my experience it has been true. Just as well known as Java (by known I mean people recognize the name) and C++, and far ahead of languages like Python or Ruby or ML, C predates them all.
There's a reason C survived all these new languages, but I have yet to find it. As my computer science professor explained, C is like learning to drive a stick-shift car. It's very difficult to learn and people will laugh at you for not using an automatic, but it allows you to do much more with your knowledge and makes you appreciate the car more. The problem with that analogy, for me at least: I learned to drive on a stick shift, and it didn't take me nearly as much time to learn that as it has for me to learn C.
After learning to Program with a very "clean" (my own quotes) language in Haskell, and then a very English-friendly language in Python, learning C has been an adventure. I imagine myself as an explorer in the heart of Africa, paving new paths and meeting new people, always confused and amazed by their customs and constantly pondering how they are able to survive with such "primitive" methods. Just as those people were probably racist, I feel I am language-ist for thinking such thoughts. But I cannot see the need for the jungle of semicolons and curly brackets. My progressive programming languages had no need for such strange and unneeded grammar. But C does.
Harnessing C is difficult, and I am nowhere near where I should be. I spent a good 5 hours today trying to make my program read a file in 1 MB chunks instead of the whole thing at once. But it now works, and I think I'm a better programmer as a result. If learning Python was easy mode and Haskell hard mode, C would be god mode.
The thing I've found with C is that I improve much faster than I have with any other language. I wonder if that's because of the pace of the class (absurdly fast) or because the language just works like that. C is a stressful and complicated language, and I think working for 10-12 hours on "simple" programs trains your brain to deal with it better and faster next time. Somehow, being forced to solve a problem in C is training me to solve problems better and faster than any other language I have experience with. Also C programs run fast. If Haskell and Python were planes, C would be the Starship Enterprise. Not only are the file sizes smaller, but they just run faster. Significantly faster. And I can definitely appreciate that.
Lastly, I need to rant here for a bit. The big problem with teaching C in the modern day is Google. Google is the place to go for programming help. Need to know how to parse something in Haskell. Quick google search gets you the function you need. Need to know how to work with URLs in Python? Google that shit. Need to know how to do anything in C? Nope. Because of languages like C++ and C#, searching for any C code on the internet is a giant pain in the butt. Everybody tries to give you C++ code, and while the languages are similar they are different enough that the code will not work. Conversations I've had with some people all seem to lead to the same conclusion: C is used by programmers who do not need help from the internet, so they don't put anything on the internet. It may be true that C is at a level beyond that of the average programmer (if such a being exists), but I'd really appreciate it if Google could give me some answers every now and then (yes, I know about Stack Overflow).
There's a reason C survived all these new languages, but I have yet to find it. As my computer science professor explained, C is like learning to drive a stick-shift car. It's very difficult to learn and people will laugh at you for not using an automatic, but it allows you to do much more with your knowledge and makes you appreciate the car more. The problem with that analogy, for me at least: I learned to drive on a stick shift, and it didn't take me nearly as much time to learn that as it has for me to learn C.
After learning to Program with a very "clean" (my own quotes) language in Haskell, and then a very English-friendly language in Python, learning C has been an adventure. I imagine myself as an explorer in the heart of Africa, paving new paths and meeting new people, always confused and amazed by their customs and constantly pondering how they are able to survive with such "primitive" methods. Just as those people were probably racist, I feel I am language-ist for thinking such thoughts. But I cannot see the need for the jungle of semicolons and curly brackets. My progressive programming languages had no need for such strange and unneeded grammar. But C does.
Harnessing C is difficult, and I am nowhere near where I should be. I spent a good 5 hours today trying to make my program read a file in 1 MB chunks instead of the whole thing at once. But it now works, and I think I'm a better programmer as a result. If learning Python was easy mode and Haskell hard mode, C would be god mode.
The thing I've found with C is that I improve much faster than I have with any other language. I wonder if that's because of the pace of the class (absurdly fast) or because the language just works like that. C is a stressful and complicated language, and I think working for 10-12 hours on "simple" programs trains your brain to deal with it better and faster next time. Somehow, being forced to solve a problem in C is training me to solve problems better and faster than any other language I have experience with. Also C programs run fast. If Haskell and Python were planes, C would be the Starship Enterprise. Not only are the file sizes smaller, but they just run faster. Significantly faster. And I can definitely appreciate that.
Lastly, I need to rant here for a bit. The big problem with teaching C in the modern day is Google. Google is the place to go for programming help. Need to know how to parse something in Haskell. Quick google search gets you the function you need. Need to know how to work with URLs in Python? Google that shit. Need to know how to do anything in C? Nope. Because of languages like C++ and C#, searching for any C code on the internet is a giant pain in the butt. Everybody tries to give you C++ code, and while the languages are similar they are different enough that the code will not work. Conversations I've had with some people all seem to lead to the same conclusion: C is used by programmers who do not need help from the internet, so they don't put anything on the internet. It may be true that C is at a level beyond that of the average programmer (if such a being exists), but I'd really appreciate it if Google could give me some answers every now and then (yes, I know about Stack Overflow).
Wednesday, February 6, 2013
Obligatory Birthday Post
I should be writing a paper. And getting my computer science lab done. But why do that when I can blog?
Today is my 20th birthday, and that means very little to me. I prefer to celebrate every 1000 days rather than every 365.25. But society tells me that I should celebrate, so I did. I did some homework last night, I'll do some homework tonight, and I'll go to baseball practice and run some. Tomorrow I'll finish my paper and go to an info session on becoming an RA. If that's not celebrating, I don't know what is!
Actually, though, I'm celebrating by having some leftover soda from the Super Bowl party. I haven't had soda this whole quarter, so it is something of a big deal. Also related to food: I have eaten 3 full meals a day on almost 90% of days in school this year. Again, might not seem like a big thing, but that's something I've tried hard to improve on from last year.
I know I haven't addressed my workout schedule at all since, well, a long time ago. Now that baseball has started up I only give myself the option of working out on Thursdays (no practice) or Saturdays (might as well be no practice sometimes). My arm seems to be in pretty good shape but my ankle and legs still aren't 100% yet, which is very disappointing. Still, it's a big improvement from last year and I should be ready to go by the time games start up.
Till next time.
Today is my 20th birthday, and that means very little to me. I prefer to celebrate every 1000 days rather than every 365.25. But society tells me that I should celebrate, so I did. I did some homework last night, I'll do some homework tonight, and I'll go to baseball practice and run some. Tomorrow I'll finish my paper and go to an info session on becoming an RA. If that's not celebrating, I don't know what is!
Actually, though, I'm celebrating by having some leftover soda from the Super Bowl party. I haven't had soda this whole quarter, so it is something of a big deal. Also related to food: I have eaten 3 full meals a day on almost 90% of days in school this year. Again, might not seem like a big thing, but that's something I've tried hard to improve on from last year.
I know I haven't addressed my workout schedule at all since, well, a long time ago. Now that baseball has started up I only give myself the option of working out on Thursdays (no practice) or Saturdays (might as well be no practice sometimes). My arm seems to be in pretty good shape but my ankle and legs still aren't 100% yet, which is very disappointing. Still, it's a big improvement from last year and I should be ready to go by the time games start up.
Till next time.
Subscribe to:
Posts (Atom)