Aug 14

Developing in PHP

Since July 1st I’m part of the “PC” team of Industria, Group T’s Engineering student organisation. I started right away by learning / refreshing some PHP stuff. It’s really not that hard when you already know a good bit of Java and C.

Anyway, the first webapplication I wrote was a second hand book selling system where members of Group T can sell their expensive books that they don’t need anymore. This being the first time I actually code something that roughly resembles a project in PHP I started out with several files for each view (your own list, add/edit book, list of available books, …) but soon I switched to a simple $_GET action magic, which made editing a lot easier.

As the new academic year is closing in I’m hoping people will start using it more as there are only thirteen books listed at the moment. Even though it’s a pretty simple application I’m proud of it :)

The second (bigger) project I started on is the famous 24h run application that Industria uses to keep track of things before and during the event. I have updated the database and tables that were used last year, removed a lot of unnecessary redundancy and duplicate code. New this year are achievements and badges, these are slightly different from points as their conditions to unlock them are somewhat more special than running a lap at a certain time below a certain duration.

This was a good opportunity to get back into building SQL queries and working with phpMyAdmin instead of using SQLyog. All in all there are currently nine personal and five team achievements. On a user’s profile they are loaded dynamically as they are grabbed from the database. Some generic ones such as “Get X amount of laps/points” can be easily added without any edits to the code.

Continuing this, the pages used during the event to register runners and keep track of laps and laptimes were quite messy as they were written very quickly one or two years ago while receiving no fixes or updates later on. I cleaned them a bit by using includes instead of having duplicate code all over the place. The laptime register page also received a few fail safe features that should help reduce the amount of incorrect registrations of laps.

While I was spending time coding all of these things I encountered many blank pages, internal server errors and such. Often it was because of a semicolon or a bracket that was forgotten or lost, sometimes very frustrating as showing errors was disabled on the server until very recently.

All in all a good start for a year full of PC-goodness!

May 31

Looking back at… Engineering Experience IV

Some time ago I posted about our engineering project, here’s the (almost) finished result:


This video gives you the general idea of the project. The final product was more polished and had additional features. During the demo day quite a few people were impressed by the fact we used an accelerometer in combination with motors, a microphone, a SIPO and PWM.

People could vote for one of the 15 teams and we ended up being third, so all in all not a bad result!

One thing we’ve learned is to be not too ambitious with a project. It took quite a while to understand the different components and make them work decently. We’ve ran out of time at the end and so not everything was as we wanted it to be.

This time it was more serious and in the end we all gained a lot of experience in programming an actual microcontroller (a Microchip PIC18F2553) and using ‘real life’ electronic components. However, it was unfortunate that the part on the PIC was handled in the lectures only these last two weeks so we had to figure out a lot by ourselves. This proved somewhat challenging because we’ve learned reading and completely understanding a datasheet are two completely different things!

May 03

Precampagne Gold

Het is de gewoonte om 2 weken voor de eigenlijke kiesweek van Industria een precampagnedag te houden. Dit jaar zijn er twee opkomende ploegen, Gold en Wave die zich deze week er aan gewaagd hebben.

Ik kan niet vergelijken met de precampagne van Wave (was niet op GroepT die dag) maar de precampagne van Gold verliep vrijwel foutloos. We hadden er voor gekozen om zowel in het atrium als buiten een terras te houden. Terwijl er binnen pintjes aan 50c getapt werden kon er ook op een van de vier spelconsoles gegamed worden via vier projectoren die we van de 14 mochten gebruiken. Buiten hebben we een gigantische hoeveelheid hot dogs verkocht, er is zelfs tweemaal moeten bijgehaald worden. Het weer klaarde gelukkig ook wat op zodat het aangenaam was om op de blauwe steen te chillen, voor wie zin had waren er ook waterpijpen voorzien.

Al het geld wordt integraal terug in de student gestopt, met name tijdens de kiesweek. Bij elke aankoop van 1 euro werd er ook een tombola lotje bij gegeven waarbij er kans kan gemaakt worden op verschillende prijzen zoals een surfreis twv 400 euro, een wasmachine, wijn, …

Met een beetje hulp van de uitvallende stroomvoorziening in een deel van Leuven zaten beide terrassen rond 16u goed vol, het ideale moment om een gratis vat te geven.

Nu hopen dat de mensen de naam GOLD onthouden tot aan de kiesdag!