Wednesday, November 30, 2011

Sleep Deprevation

Last night I couldn't fall asleep... at all. But I did figure out a solution for a programming problem I working on. It only took me a couple of hours to code it up and get it working.

I hate it when my brain refuses to stop thinking when I need my sleep.

//END OF LINE

Wednesday, November 23, 2011

Tuesday, November 22, 2011

Stable Matching/Marriage

I don't know if you've heard about the stable matching/marriage problem, but for a class my group had to present on it. And I decided to implement it using c++ (it's my goto for simple programs I need to just throw together quickly because I've had about 7 years of experience in it and only about 5 in java). The nice thing is that it actually worked. The Gale-Shapley algorithm is what we used to solve this problem. I'm currently working on implementing a solution to the stable roommate problem. I've run into some errors but hopefully once the semester is over I'll have a little more time to perfect it.

Here's the link to the Google Code Project.

//END OF LINE

Tuesday, November 15, 2011

WebOS Calculator

I made a simple calculator for the WebOS platform. I know I definitely enjoyed it a lot more than when I did that first app because instead of having to use the emulator, I got to test and run it on an actual HP touchpad (thank you husband for wanting one :)) It was a lot better than using the emulator plus it's hands on.

The only problem I'm having is trying to manipulate the height of the buttons to be relative to the full screen... I got the width working correctly but not the height.  Currently I'm changing the font-size and not the actual height. But as you can see from the screen shots below it would be better to adjust the height relative to the total space available.

Currently I just created a class style in my .css file here's what it looks like:
#buttons
{
   font-size: 400%;
   width: 24%
}


I've tried height: 20% but it does absolutely nothing...

Portrait

Landscape















So all in all, besides the fact that it's purely javascript and html, I actually enjoyed getting something done tonight. Granted it does next to nothing but still it works, and that's really all I care about right now.

//END OF LINE

Sunday, November 13, 2011

Big No No's

Currently I'm working in the computer lab on campus, where beginning students can come in and work on their projects and get help.

Oh boy have I seen some awful coding practices... REALLY AWFUL stuff.

Here's a list of my top 5:

5. Arrays start at 0... NOT at 1.

4. Not reading the assignment and then asking for help is just plain dumb... I'll only be able to help you AFTER I READ the assignment, which you could have done.

3. Please don't forget that your general program runs linearly. That means that the if a line of code is after another, then it'll be executed afterwards... so if, for example, you want to output something after another thing, make sure it's after it in the code...

2. Seg faults... ugh they are frustrating, but if you don't know where it is I can't look at your code and just magically know the answer... use cerr statements!

1. If your using arrays to get the same sort of information (such as grades) and then finding an average... please, please use a loop of some sort... and just don't write it out for every single index and then make me read basically the same line of code over and over trying to find your error... please...

//END OF LINE

Ugh...

Things have been so busy lately... and yet they haven't. I need to start a project and get my hands dirty but homework has been getting in the way... frustrating.










Sadly it's so true... I feel this way a lot.

//END OF LINE

Saturday, November 12, 2011

Algorithms

I haven't been able to do much in the coding world, except a simple program to demonstrate the stable matching/marriage problem for my algorithms class.

I have quite a few ideas for projects I want to start, but school and work has been taking up way too much of my free time and the rest of that free time is spent playing minecraft and portal... yeah... I'm calling it research...

//END OF LINE

Wednesday, November 2, 2011

Monty Hall Problem

Today in my beginning Math class (I have to take it to graduate and needed an easy A... but basically it's just pure torture and I'm constantly bored) we discussed the Monty Hall problem. It goes as follows:
Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1 [but the door is not opened], and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice?
So what do you think the answer is?

//END OF LINE

Tuesday, November 1, 2011

WebOS Part 2

After a very long argument with my WebOS emulator, and frustrating moments with a "simple" tutorial, I finally was able to create a simple RSS Feed Reader in WebOS.

What did I learn? I hate javascript... with a passion.

//END OF LINE

WebOS: Bitter First Taste

I may be delusional and sick but the WebOS emulator for HP development is frustrating me.
I have no idea how to get back to the main screen from any where, I hate have to turn my head sideways in order to see my program running at the proper viewing angle. It's just awful! Like I said it may just probably be me being dumb and any tips would be much appreciated.

//END OF LINE