Skip to main content

Just switched to Ubuntu

I decided to replace the Arch Linux installation on my desktop (my main computer) with Ubuntu. Too bad I don't get to feel 1337 for using Arch anymore.

So far, so good, except I had a few issues when setting up Eclipse, but I always seem to get issues when installing Eclipse, no matter what platform...

One of the main reasons why I decided to do this is because whenever I updated Arch, something would break. I really like the bleeding edge idea behind Arch, but I'd prefer to have some stability in the operating system I need to use every day. I also don't have as much time as I had before to get everything working after an update. This is the same reason why I started using Ubuntu instead on Arch on new installations.

Not to say Ubuntu is perfect, either. I spent some time tweaking it so I could have the same setup I had in Arch. I don't hate Unity, but I don't really enjoy using it either, so the first thing I did was install XFCE. Afterwards, I installed all the development stuff I need for work. It's really easy to get a LAMP server ready in Ubuntu by using tasksel.

One thing I love about Linux is how you can just copy your whole /home/user directory and dump it on another installation, and most programs will pick up the correct settings. This made it really quick to get all my stuff up and running exactly how I had it set up before. Actually, I have a git repo just for that.

Now... back to programming.

Origins

I really wanted to make a new post today. It took me a while to think of a good thing to post about, but I finally came up with something. I'm going to tell you how I got into programming.

I've always been an introvert. When I was a kid, I had only one or two friends, and I would always play videogames after school. I remember the first console I owned was a Nintendo GameCube. Anyway, there was a computer in the house. I don't even remember how I learned to use it, but I'm pretty sure the first operating system I used was Windows XP. I remember having used some Linux too, but I don't remember what distro it was. It was on my sister's laptop.

Anyway, when I finally got Internet access at home, I used it a lot. I don't even remember what I first did, but eventually, I joined a big community that had a forum.

I really liked the idea of being able to interact with people all over the world. I made some Internet friends, and eventually we formed some sort of micro-community of our own. There was a guy that had bought some web hosting, so I asked him if he could set up a forum for our community. He set us up with a PHP forum software called Acmlmboard.

The software wasn't very stable, had plenty of bugs, and was also insecure. Nonetheless, it worked, and my little community thrived. It was around this time that I started to tinker around with very basic HTML, since the Acmlmboard forum software allows users to customize their posts. The feature was similar to the "signature" that some forum software allows. The cool thing was that you could also add a post "header", which was like the signature, but it got prepended to the post content instead. So you could wrap HTML around your posts in order to make it look however you wanted.

Eventually, I decided to learn some PHP in order to add more features to the forum software. Yes, my first language is PHP. And I still use it to this day, despite all the hate it gets. I really like it, and I will probably continue to use it as long as I can. However, I believe in using the right tool for the job, so I've invested time in learning other languages and learning which would be more appropiate in what situation.

Anyway, the forum software's source code was a mess. HTML, structured PHP, JavaScript, MySQL queries, all mixed up in a bunch of files, global variables everywhere, commented out code without any indications of why, unused functions, all the bad PHP don'ts you can name, the forum had them.

Compared to what I program today, that forum was complete shit. But hey, we all start somewhere. Anyway, the forum software continued to evolve since my small community wanted more features, bugs fixed, etc. So I sort of learned programming by doing all that.

Some of the people in the community also knew how to program, so sometimes we would all fix bugs and touch the code at the same time. We were all homebrew programmers so we did not know of version control, or even about developing locally and then deploying the changes to the server. In short, we all modified the code that was "on production". Many times we fucked up and the site went down for a few hours, but we never really learned our lesson. By the way, this was around 2009.

Anyway, about two years before finishing high school, I already knew I wanted to be a software developer. So when I got to college (2011) I really aced through the first introductory classes since I already knew how to program. Then I learned some more professional stuff like version control, and other programming paradigms like OOP or functional programming. Around this time I also decided to switch to Linux as my main operating system.

I installed Arch Linux on the computer I had at the time (an old Pentium 4 with about 500MB of ram). The computer came with Windows XP, and the performance improvement I got from installing Linux on it really amazed me. I also learned a lot in the process, so I am glad I chose Arch Linux as my first distro.

Nowadays, I use Arch Linux on my main computer (a Intel Core i5 with 4GB ram). However, I installed Xubuntu on all the other computers, since I didn't have much time to configure them and I like XFCE. I will probably keep on using Ubuntu derivatives from now on, since it's a lot faster to get a system up and running, and I don't really care about being bleeding edge.

Back to my story, after a year or so of college, I decided to try and get a web developer position at a company so I applied for a part-time position to a place that needed PHP devs. I put a link to my Github account on my resume, and I think they liked it. I got an interview pretty quickly, and one of their developers interviewed me after the HR lady did. I felt at home there, and he noticed that I knew all that was needed for the job, so I got the job pretty easily.

Now it's been about a year after I got that job. It's been great so far, I get to work from home 8 hours a week (I work 20/h a week). If I were working full-time I would get three days of work from home.

I think being part-time has sort of affected which projects I've been assigned to. Right now, the project I am involved in has become kind of boring for me. There have been plenty of different features to build and problems to be solved, but lately, most of the work I have done is changing the application since the client keeps changing his mind. And it's sort of boring.

I know for sure I don't want to work as PHP developer forever, but I've thought about it and I'm not sure what I should work on. In the place where I work, they also need Ruby on Rails, and Android/iOS developers, so I could do either of those. However, I would prefer to work with Python or NodeJS instead, and I don't think they need that kind of developers right now. So I might apply for job elswhere next year or so, after I have graduated from college.

I'm also thinking about studying either Business Administration or something else related to business, but I'll wait until I have my Bachelor's degree in software development to decide what else to study.

And that's my post for the month. Thanks for reading!

Project Euler

I started doing the Project Euler problems last weekend. So far managed to get to problem 10.

I have realized how much I suck at math, and now I want to learn more. I know people with knowledge in math will probably laugh at my solutions, I really feel like I half-assed most of them so far.

Those with knowledge in math will probably find the problems easier than those with knowledge only in programming... Being good at math makes you a better programmer.

Did I mention I'm trying to program the solution to each problem in a different programming language? Last one I used was pascal. Never had used it before. It's a horrible language, I'm glad I don't have to use it ever again for anything.

By the way, every time I solve a problem I will updated my github repo. Check it out here. Feel free to critique!

Rainbow Tunnel

Today I had some more time to code something fun, so I decided to make a tunnel of sorts.

The trick is really simple, first you just draw rings around the center of the page, and tweak their position a bit depending on the position of the mouse.

To achieve the rainbow effect, you just have to make it so each ring has its hue value a little higher than the ring before it, and increase all of the rings' hues each frame.

I did it a little different than that, I have a base hue, which I increase every frame, and then when each ring gets drawn, it uses the base hue plus a small increment (which you can control with the mouse wheel).

I guess this is a bit trippy? See it full-screen here.