Friday, April 6, 2012

Sense of Accomplishment

Its funny how the little things in our pursuits make such a big deal to us, in my case solving an incredibly easy problem for the first time without looking up reference or clues.

As part of my personal and professional development into the world of software development, I have decided to tackle Java. Mostly because my clients have indicated that Java will be the primary language that they wish to focus on for a myriad of reasons, which I will not go into.

So what is it that got me so excited enough to make a blog post about it?

This little baby step here:


Assignment: FooCorporation
Method to print pay based on base pay and hours worked 
Overtime: More than 40 hours,paid 1.5 times base pay 
Minimum Wage: $8.00/hour 
Maximum Work: 60 hours a week

Reminder • Write your own code

So with no Google or StackOverflow to assist me I came up with this code...



class OvertimeCalculator {
    public static void main(String[] args) {
        int hoursWorked = 60;
        int overtimeHours = 20;
        int regularHours = 40;
        double hourRate = 8.00;
        double overtimeRate = hourRate * 1.5;
        
        System.out.println(
                "Hours worked at regular time: \t" + (hoursWorked - overtimeHours) +
                "\nRegular pay rate: \t\t$" + hourRate + 
                "\nOver time hours: \t\t" + overtimeHours +
                "\nOvertime rate: \t\t\t$" + overtimeRate +
                "\nRegular time pay: \t\t$" + (regularHours * hourRate) +
                "\nOvertime pay: \t\t\t$" + (overtimeHours * overtimeRate) +
                "\n--------------------------------------" +
                "\nTotal pay: \t\t\t$" + ((regularHours * hourRate) + (overtimeHours * overtimeRate)));
                
                }
}   
 


Result:

...and it worked, not the most elegant solution, and in a few days I'm sure I'll see that I could have done a whole lot better, but it is a milestone for me.


Thursday, March 15, 2012

Don't Scan Me Bro, the Unintenden Consequences Edition

While this is not related directly to the content of this particular blog, I did make a rather interesting and humorous observation today.

Today I flew out of SFO (San Fransisco International Airport) to return home to the east coast. As part of the TSA screening procedures and protocol, there are millimeter-wave scanning devices installed at the screening gates. For the five of you who don't know what these are, they are basically the baby brother of the real time xray scanners from Total Recall...
Its not a tumor!
Ok, hyperbole aside, the observation came after I had opted out of being radiated and was collecting my personal belongings, post TSA approved groping.

As I watched the other passengers who had gone through the device and were collecting their belongings I noticed something. I was relatively alone and segregated from the rest of the "mob" and had my own time and space to put myself back together, which was actually very nice. Instead of elbowing and jostling with other passengers for space and belongings, I actually saved time and significantly less stress by opting-out of the millimetere wave scan.

Of course this would all change if everyone else were to opt-out...


Millimeter Wave Scanner

Wednesday, March 14, 2012

Simply Amazing

My second post today, but this is too good in my mind to not pass on. The tech being demonstrated is Holographic display using Hogel techniques to generate a lightfield for true volumetric viewing of a static scene.

In short, the technique allows complete 6DOF viewing of complex geometric shapes or datasets, with the exception of extreme glancing angles; from my viewing, any angle less than 40 degrees off ground plane, no image is visible.

This video is from my cell phone, so I apologize for the quality, the in person viewing is spectacular however.

Special thanks go out to Pat Parker and Zebra Imaging for humoring my request to take some video of their technology.



Zebra Imaging
So I was enjoying my morning coffee and perusing my usual  "nerd" news sites and ran across this wonderful item...


Android IDE
Other than the rather unfortunate name, it appears to be a great tool for those times that you have the code bug and no access to a desktop/laptop.
I currently have it installed on my Nexus One and planning on installing it on my Nook Color.

I will post my thoughts on this IDE after I have had a chance to give it a good review, the upcoming flight back to the East Coast will be a good opportunity.

Tuesday, February 14, 2012

Happy Valentine's Day



A very happy Valentine's Day to everyone. I thought I would modify my Bokeh Particle Generator a bit for the occasion, for that special someone in my life.
Hope your day is full of love and wonder.

Monday, February 13, 2012

Bokeh Gen, 5 blades


A more recent version, this time with 5 edges, or diaphragm blades. My intention is to allow the user to be able to set the iris blade number, as well as other parameters.

Bokeh Generator

Just a quick test of a small program I am working on as a hobby. One of my interests is digital film and effects, and the Bokeh effect is one that I find particularly esthetically pleasing. This very alpha version is built in the Processing IDE. In the future I plan to add more light/lens effects as well as environmental effects. Currently the mouse coordinates act as the particle spawn origin, with a crude gravity and timer applied to the particles and their "death".

Processing
Tell me, what is this "Bokeh" thing?
Other optical aberrations