Posted by & filed under article.

My first week at MarkedsPartner is soon to be completed. So what is this and what have I been up to? For starters I had a basic run into asp.net and MVC development, this is used threw out most of the development projects and it was necessary to get a grasp of how it works. While working I would also prepare and work a bit with the IMS system from ThirdLight, where I will be working later on. During this prep I made a jQuery plugin which uses the IMS API to get images from the server and in to the desired solution. This week I have had a lot of focus completing the plugin and make it work properly. The project has been exiting and mainly it would be self driven, but I will admit that Lars (@bleedo) has been very helpful and I have learned a lot already! I am also happy to announce to any readers that uses solutions from MarkedsPartner can await my plugin, hopefully in the next update 😀

So what is a blog with out any pictures? Here are some images from where I work and the people I work with.

vidar_implementing_my_plugin

Photo of the back-end crew, showing Vidar implementing my plugin.

markedspartner_landscape

Landscape photo; first two tables showing consultants, designers and our goto guy server manager. Table in the back is still the back-end crew.

hot_friday

This is from the lunchroom and to day it was sausage Friday! 😀

Cheers.

Posted by & filed under article.

Its been a while now since the making of Inventory Manager and based on the good feedback I got from it, I decided to make it public. Originally its birth took place as a task in the subject .NET from Østfold University Collage. We where to make an application that challenges the use of C# combined with the framework .NET. At the same time during semester start, the school cafeteria got my attention in order to figure out a system that would ease and make product head count easy and efficient.

This was an exciting twist. I would make an application that would grade me and at the same time serve a purpose. During the process of making I have several times consulted with the cafeteria and they have provided useful information. The result of the project is an application that keeps track of all the EAN numbers for all the registered products. Each product has two registered EAN numbers where one represents a single unit and the other represents a pack with multiple units. This way it can manage boxes and single products.

Now you might wonder how this works. In order for this product to be valuable, it needs to be connected with a barcode reader. This way its easy to convert barcodes in to digital numbers. The connection between computer and the barcode reader is a simple a neat USB barcode reader. With a USB barcode reader its plug and play and when a barcode is scanned, the scanner convert it into numbers and type them automatically as a keyboard would do, followed by a return stroke.

So now we have an application that handles product and keeps track of all scanned products. In order to lift it to the next level and make it useful in a wide specter. The secret lies in the presentation of the results. The results is exported to Microsoft Excel with formulas intact and easy to edit. Most users are known with the use of Excel and uses it on a daily basis. Therefor exporting the results nicely to Excel puts the user back to a comfort zone and not to forget that Excel is a powerful application it self. The next image show a sample exported to Excel.

I hope the project can bring use to other small businesses, the setup files can be downloaded beneath and for those who find it interesting the source code can be downloaded as well.

The install files can be downloaded here.

Full documentation is located here. (Norwegian)

Source files can be downloaded here.

The project was graded A and I would like to thank Lars-Erik Aabech that gave me constructive feedback and tips on how to organize my code.

Posted by & filed under Uncategorized.

During the preparations for the Enigma election, an student society for the students located at the department of technology at HiØ. I took part of making the election system handing voters and the votes.

To start off, we have a database containing all the members and their user name. Since the usernames are generated by the school, it enables us to combine them with @hiof.no to complete a personal email address. So to verify our votes they will need to submit their username. Based on this username we can genarate a personal key witch we can email to the user. We can now be sure that only the user sees this key and be able to use it.

The frontpage (index.php) hadles the user verification and email the the key. When the user opens the email, the hash key is passed with in the link. When clicking the link you get back to the frontpage and your key is stored within a session before you are relocated to vote.html.

if(isset($_REQUEST['key'])) {
    $key = $_REQUEST['key'];
    $_SESSION['mykey'] = $key;
    header("Location: vote.html");
}

The image illustrates the different elections with tabs and lists the candidates. When the vote is placed the next button is enabled and you can proceed.

vote example

Vote.html is html page with general html and some awesome jQuery. Tho the code presented it self might not be awesome, but jQuery sure is! All the stuff thats happening now is pure ajax calls to feedHandler.php. This php file handles the request from ajax and vote.html, some of the requests is just initiated with setting a variable true and some require some numbers and stuff. Down bellow is some of the handlers presented with code.

$type = $_REQUEST['getCandidatesByElection'];

if(isset($type)) {
    echo json_encode(getCandidatesByElection($type));
}
if(isset($election) && isset($candidate)) {
    setVote($election, $candidate);
}
if(isset($submitVote)) {
    submitVotes();
}

To wrap it up, I use these handlers to save data and submit them afterwards. What I think is the awesome part is that I can store information with sessions. So when setVote is called, we are saving the results from that election to a session variable. When completed the results is submited to the database with submitVotes. Tho it might be smart to mention that the vote results is updated by the private key. The key entry is made when you submit your user name at the frontpage and it reserves a slot for your votes.

A demo is located here: http://www.it-stud.hiof.no/~olavjh/prosjekter/enigma_valg/?key=286d1a46628c32c7708489f68e531fc5

Posted by & filed under android.

Nok en ny utfordring i Android gruppen ved HiØ. Denne måneden er det følgende oppgavebeskrivelse:

Månedens apputfordring er å lage en terningkastapp! En enkel knapp som gir deg et tilfeldig tall mellom 1 og 6, hele Yatzee-settet som kastes ved å riste telefonen, eller kanskje rollespillterninger i 3D? Det er opp til deg! – Se forum

Det ble en strålende utfordring for å teste ut OpenGL på Android, noe som i senere tid ser ut som et engangstilfelle. Etter en del justering for å få til en kube som har hele flater rundt og riktig perspektiv ser det ut til at vi har et testresultat som kan presenteres. Løsningen er langt fra optimal og for å avgjøre hvilke øyne en for på terningen er like tilfeldige ettersom roteringen skjer på x,y og z aksen. I noen tilfeller havner den på høykant, men det er vel helt realistisk?

Se video av applikasjonen:

Posted by & filed under Uncategorized.

Created on Friday, 09 March 2012 14:22

Da Favorite Systems kom for å holde bedrifts presentasjon på HiØ snakket de mye om hva som egner seg best til hvilken plattform og hvilke utfordringer det er å utvikle applikasjoner til flere plattformer med minst mulig arbeidsinnsats (more money). I forkant av denne presentasjonen gikk de ut med en konkurranse hvor man skulle lage en applikasjon som presenterte utvikleren.

Challange acepted!

Fra mitt tidligere arbeid og eksperimentering med canvas fant jeg ut at dette måtte videreføres og at neste prosjekt også måtte bli et canvas prosjekt. Prosjektet startet med å rotere bilder rundt i 360grader. Når presentasjonen roteres mellom 0 og 90 skal den krympe og vokse avhengig av hvor nærme den er 0. Mellom 180 og 90 skal den krympe og vokse, men nå ønsker vi at den skal krympe ved 90 og vokse ved 180 grader. Da som teorien er på plass var det bare å “jokklemokke” dette til fornuftig kode.

Bilde over illustrerer litt av tankegangen rundt hvordan presentasjonen skal fungere. Ved å legge til flere slides oppstår fort problemet om hvem som skal ligge lengst frem og hvor mye man skal rotere. For dette prosjektet besluttet jeg å begrense meg til 4 slides som gjør det enkelt å rotere de (90 grader for hver rotasjon).

Lyst til å “poke” litt i koden finner du prosjektfilene her. En illustrasjon kan du se her:

Posted by & filed under android.

meh kitchen timer

Jeg har lenge straffet meg selv for at jeg ikke var flinkere til å følge med i matte timene da vi gikk gjennom cosinus og sinus. Dette har lenge forblitt et mysterium frem til nå. Jeg har besluttet meg for å gå nærmere inn på hvordan jeg kan benytte meg av sirkelberegninger for å øke kvalitet og muligheter i prosjekter. Etter noen små prosjekter kom det en konkurranse på Enigma sitt forum som oppfordret til å lage en kjøkken klokke. “Chalange excepted” og her er resultatet.

Tidligere prosjekt som inspirasjon