So there’s only web development…

So, after talking to a friend of mine he came up with a statement that I believe sums up the New Zealand IT industry pretty well. “Its all web development”. The industry here contains a few large companies, which hire some CS/SE graduates, but the vast majority will find themselves after university working on some aspect of developing essentially web pages.

For someone who doesn’t particularly enjoy web development, this is a rather bitter pill to swallow, learning that if you want to work in any other aspect of IT, you should probably move to Australia/UK/America.

What’s even more disappointing is that during my 5 and a half years at university, there was hardly any emphasis placed on web development. I think in total there were 2 courses that dealt with any kind of web development. This leaves a large gap in my education, as people that are hiring are looking for experience with CSS, Javascript, AJAX, technologies which the university does not teach at all, and PHP/ASP.NET, MySQL/MSSQL which the university does a poor job of teaching. In fact looking at the curriculum the only thing that the Computer Science degree seems to prepare you for is more Computer Science.

So anyway… It’s no use bitching about the past now. If I’m doomed to become a web developer then I might as well become the best fucking web developer this side of the equator. But this is going to involve a lot of learning. The type of learning I dread and generally avoid. Learning by yourself, in your own spare time. Having to force yourself to read another chapter after coming home from work tired and worn out from your shitty job. The really hard kind of learning… fuck.

But I do in fact have a plan. And having a plan keeps me from having a total nervous breakdown, something which I’ve been really close to this last month.

My plan essentially involves learning everything about web technology, from the ground up, from setting up a LAMP server to AJAX. This is an ambitious goal for me, one which might take over a year or more to complete as I don’t know how much time I will be able to commit to my “2nd education”. But I do know roughly what it will involve.

Step 1: Wiring up my house. That is to say put in ethernet cables connecting the bedrooms of the house, the living room and the garage. This will allow me to put my de facto webserver (old HP pentium 4 my girlfriend was going to throw out) into the garage and to have it running full time. This computer is a mixture of web server and storage server (after adding a 320GB HDD) and will serve files to the internet and to the different devices around the house (in the future I could have a separate machine as a file server and a webserver) This should also give me experience on how to set up a network for a SOHO (Small Office Home Office).

Step 2: Domain Name. Opening an account with a dynamic dns provider and setting up a domain name. Probably going to use dyndns.com as it seems to be quite popular.

Step 3: Learning about webservers, file servers, ssh servers, nfs servers, ftp servers, proxies etc… Because I want my web/storage server to be universally accessible it needs to be able to serve files across a wide range of protocols. For each of the types of server I need to

  1. Install the software
  2. Configure the software i.e. get it to do what I want securely

Luckily I have found a resource that deals with these issues and a lot more. The resource being www.linuxhomenetworking.com. The website is well written, easy to read and up to date. It’s also free.

[NOTE: I should mention now that I intend to use only OSS software as a part of this education, for reasons which I will probably write about later]

Step 4: Install software for the management of my server. This includes things like Webmin, MySQL Administrator, PHPMyAdmin and perhaps some software to configure Apache (is there a decent GUI frontend for Apache or does it come down to editing config files?)

Step 5: Installing existing CMSs’ and understanding how they work. Looking at software such as Joomla!, Drupal, WordPress, Blogger (is the blogger source code available?), Silverstripe (Go NZ!) etc… and looking at how they are made, paying particular attention to how they handle extensibility (add-ons, extensions) and theming. However for the basic ideas on how to create a CMS I’ll probably start with php-mysql-tutorial.com. It should be interesting to see how much difference in the designs of these CMSs’ there is and the benefits/disadvantages of each approach.

Step 6: Learn Cascading Style Sheets. I have a real love/hate relationship with CSS. That is to say I f***ing hate CSS. As far as I’m concerned, CSS is a great idea (separation of content and presentation), implemented in a totally illogical, counter-intuitive, overly complex way. But to be fair, that’s what I thought of a lot of programming languages I learned until I “got” them. So maybe sometime in the future I will really love CSS, but I wouldn’t bet money on it. I’m probably gonna go with the tutorials from W3Schools or failing that get a book from the university library on CSS.

Step 7: Learn Javascript. Again, I feel like I’m 10 years behind the learning curve with this one, but thanks to university (and my own lack of interest in web development) this is another area which I have hardly any experience with. With this one I’m gonna follow the W3Schools tutorials and if needed get a book from the uni library.

Step 8: Learn XHTML. Another one from W3Schools. Basically need to learn along with Javascript to be able to understand AJAX in step 9.

Step 9: Learn AJAX. Start with W3Schools tutorial on AJAX, then can move on to other examples on the internet. There’s so many on the web that the biggest problem learning is going to be information overload. A book might be useful as well.

So then the question arises as to what to do with all of this new web development knowledge and the server sitting in my garage. The thing to do I guess would be to make a website to showcase my talents which could be a point of reference for people seeking examples of my skills/knowledge.

Also the idea of creating a photo gallery CMS based on the work I did with LaPhotographie is an idea I’ve had for a while. Such a system would, of course be open source and perhaps some day take off and become more than a pet project.

And the possibility of turning the setup in my garage into a web hosting company is there as well.

So there you go, that’s my plan. It helps me to keep busy and ignore the fact that I’ll probably end up doing web development for a long, long time.

Don’t feel like downloading another CD?

Trying out Linux doesn’t have to mean downloading a 700MB CD image and then having to burn it onto a CD. Thanks to the university software mirrors you have at least three places where you can go to get CD images for free.

Option 1:
http://mirror.cs.auckland.ac.nz/ – The Department of Computer Science software mirror. Clicking on the ‘iso’ or ‘linux’ folders will give you access to a large variety of the most popular distributions, including some less known ones. The mirror is kept fairly up to date and if they don’t have what you’re looking for you can always email the CS mirror maintainers and ask them nicely to help you out. The mirror has a host of other software as well and it’s all FREE!!

Option 2:
http://intraftp.ece.auckland.ac.nz/ – The Department of Electrical and Computer Engineering FTP server. Although compared to the Computer Science mirror the FTP server has a sparse collection of Linux distro’s, they do host an Ubuntu and Debian software repositories, which have most of the software programs you are ever gonna need.

Option 3:
http://dist.ec.auckland.ac.nz/ – This is the server which all of the Linux machines in the labs get their updates from. Not much in the way of CD images here, just a Debian, Ubuntu and possibly RedHat repository.

Once you’ve chosen your distro, download it to /tmp, under Linux or C:usertmp. under Windows and then burn it to disc (most of the CS lab computers have CD burners). If you try to save the CD image to your afs drive (H: drive) it will most likely tell you that it can’t do it due to a lack of space. The default allocation for Science students is about 300MB. If you download to the temporary folders though, don’t expect to be able to access your files the next time you log in. The files in those directories are deleted regularly.

Keep your Ubuntu System up to date for free

Have you ever been at home just browsing the net, when all of a sudden that orange update icon pops us? You click on it only to discover a new version of Open Office and an associated 200MB download. You look at your internet usage only to find that you are only 250MB away from your monthly limit with two days to go. So reluctantly you click to download and install the package and then realize you have to go find something to do for half an hour while the package downloads.
This how-to tells you how to avoid having to waste time and bandwidth by using the university’s repository. It should be particularly useful for people with slow connection speeds or low monthly data allocations.

To do this we need to first write down the names of the packages that need updating, their version numbers and which section of the repository they are from (main, universe, multiverse).

1. Start up Synaptic and click on the section ‘Installed (upgradable)’ in the left hand listbox. In the right hand section of the window you should see the packages that need upgrading.

e.g. tcpdump from version 3.9.5-2 to 3.9.5-2ubuntu1

2. Right click on a package and select ‘Properties’. In the ‘Common’ tab, there is a line which says ‘Section: …..’
Packages from the main repository will just have the section name. Packages from the universe repository will have ‘(universe)’ at the end of the line. Packages from the multiverse repository will have ‘(multiverse)’ at the end of the line.

e.g. for our example package tcpdump it says ‘Section: Networking’ meaning that it is in the main repository.

We now have the info we need. Now we can go to uni and navigate to http://intraftp.ece.auckland.ac.nz/. This is the ftp server of the Department of Electrical and Computer Engineering and is only available at uni. The server has a lot of software available, so feel free to look around.

3. The part we are interested in is the ubuntu repository. So we are going to navigate to ubuntu –> pool –> [the repository of your package] –> [the first letter of your package] –> [the name of your package] –>

e.g. -> ubuntu –> pool –> main –> t –> tcpdump –>

4. Once there, simply find the files which match the version number of our upgrade and end in .deb

e.g. tcpdump_3.9.5-2ubuntu1_amd64.deb
tcpdump_3.9.5-2ubuntu1_i386.deb

5. Select the file which matches your processor architecture and save it to your USB drive.

6. Take it home and double click on the file. You will get a warning saying that the package is available through the internet and that you should install it from there. Ignore it and install the package.

If you have a laptop or you feel like taking your computer to uni one day the process is even easier. Simply open your sources.list file and add

Code:
deb http://intraftp.ece.auckland.ac.nz/ubuntu/ feisty main restricted universe multiverse

and then run apt-get or synaptic.

This method is also good for upgrading or installing new software.

Post Graduate Diplomas

In computer science at undergraduate level, the lecturers usually talk to each other to make sure there are no conflicting tests/assignments because they know if they take the time to space out the assignments it will lead to higher quality assignments due to the students not being forced to hand in two assignments on the same day.

This does not happen at post graduate level. If anything the lecturers seem to be in their own world, oblivious to anything else but their own topic of study. Handing out assignments like Saadist, each considering his topic to be of greater importance than the others. More than once this semester I’ve had due dates where I’ve had to hand in two assignments on one day and another the day before/after. It’s the ‘study break’ now. Lectures are officially finished, so it should be time to study. But not if you’re doing post grad comp sci. I’ve got two assignments to hand in on the tuesday after Queen’s Birthday monday. Wonderful timing again, seeing as how the university will be closed on the monday. Exams are coming up, I’m falling into my usual pre-exam depression. Wondering if I’ll be able to pass all/any of my exams. If I fail everything I can always go and join the army 🙂 That’s what I tell myself every time I fall into this self-doubting phase before exams. I always try to imagine the worst case scenario and then re-assure myself that it wouldn’t be that bad. The worst part would be the guilt and shame I would feel if I failed miserably. I would feel that way because I know that I could have done better. My problem is not so much a problem of ability, but of motivation. In recent years I haven’t felt much motivation to do anything. Actually that’s not true. I have felt inspiration, but not from university. It’s probably a sign that I should enter the workforce.

Network Printing Part 2 – the ‘lpr’ method

Now that we know how to get the ip address of the printer and how to send files to it, lets examine another way of sending files to the printer. The ‘lpr’ method.

What is lpr? You might well ask. A full description can be found here and here. Basically ‘lpr’ is a client printing program which sends files to the server printing program, ‘lpd’. An example of how an actual print server is set up can be found at this support site, where they tell staff how to set up their own computers to work with the university printers.

The thing about network printers is that some of them have built in lpd functionality. Meaning that they act like their own lpd server, accepting files sent by the client program, lpr. So to send the file using lpr type (in the command line):

lpr -S [ip address of printer] -P [ip address of printer] [path to your printable file]

and voila! the document prints.

Network Printing Part 2 – the ‘ftp’ method

One of the properties of a network is that any device on the network can send files to any other device on the network (unless the router is configured to block traffic). This means that bypassing the print server (computer next to the printer) becomes as easy as figuring out the ip address of the printer and sending it the file. Finding out the ip address of the printer is relatively easy. Most printers have a function to print out their settings. So in order to find the ip address, just browse through the menu on the front panel of the printer until you find an option which says ‘print configuration/settings’ and the printed page should have the ip address of the printer.

The next step is to get the file we want to print into the right format. To do this in Adobe Acrobat, simply go to the regular print page and place a tick in the ‘print to file’ tickbox in the bottom left hand corner. The file will appear in the same place as the original document. Now to send the file to the printer. First:

Open an FTP connection to the printer, (at the command line) type:

ftp open [the ip address of the printer]

Once you establish the connection, send the file:

put [path to the printable file]

And that’s it! The printer should automatically print the file upon receiving it, no login, no charge.