X-Istence's blog

Arizona; I'm here to stay for a little longer

Major corporation contacted me this past monday while I was in Colorado (Helped a friend move there!), and unfortunately they do not think they have a place for me on their team.

On the 15th of January I had my first interview with the corporation, and unfortunately I really think I didn't get hired because of that interview. During the interview I was extremely nervous and was unable to calm my nerves as I was unable to gauge the feelings of the guy on the other end of the phone. The connection quality was extremely low and there was much static as such I had to repeat much of what I said during the interview multiple times, and had to ask for the interviewer to repeat the questions. During this same interview I also completely blanked out and mixed up seven different programming languages. Afterwards when I was able to think clearly again I realised how easy the question was and implemented what the interviewer had asked for in minutes.

The second interview came an hour later. This one went extremely well, best of all the phone connection was perfect so I was able to understand the interviewer and him me. He was interested in some of the projects I had worked on in the past and was able to get me to loosen up and feel more at ease. The programming questions he asked me were easy to implement and I did much better, this time writing almost valid C++ programs without any significant issues. The guy was much more easy going, and we even had a pretty good conversation over email after the interview was over regarding the Near Space program I was a part of.

As mentioned before, I did not get the job. I was really looking forward to it as it would provide some very unique and interesting challenges that I wouldn't have been able to find at any other workplace. Great perks and benefits and I would have been amongst some of the smartest people in the world. I'm attempting to put it all behind me. I've been firing off my resume to all kinds of different job opportunities. If you happen to know anyone that is hiring a computer programmer/software engineer with experience in Unix based operating systems and a big interest in hardware design (electronics) please contact me using bertjw@regeer.org as my email address.

--

Before I went on vacation I decided to purchase a Flickr Pro account to upload my staggering amount of pictures to the internet so that I could more easily share with my friends and family. Please feel free to peruse my Flickr Photostream. I took some pictures while I was on break in Hoboken from across the Hudson towards New York, I personally find them to be absolutely fantastic, so please take a look at my pictures of New York during the day and night. I've always loved doing night photography of cities and towns, but never really get the opportunity to do so. These pictures were taken from the balcony in my dads apartment, which is right on the river.

--

In closing I just wanted to link to the XKCD comic that was just published a couple of hours ago: Spirit. Now, generally XKCD's comics are funny, however this one just hit close to home as I have always thought of the robots I have built as beings, as equals. The first thought that came to mind was Fry's dog in Futurama. It is by far one of the saddest scenes in Futurama invoking some very powerful emotions. Randall does a good job in personifying Spirit in this cartoon! I really have to stop cutting onions while browsing the web!

Late nights and Interviews

244 is a Hardware Studio if you are to believe the sign outside of the door, however really it is just an empty workspace/lab where individuals such as myself can sit down and start doing work, or procrastinate. It is open 24/7. Every Saturday a group of ex and current students from UAT gather in the lab and sit down together to work on various projects and to just have fun. We off course have our very own resident pizza connoisseur, and everyone adds to a large pot of cash so that at around 10 PM we all get some of the best pizza available around town.

Last night was another of such nights. Some people were playing MW2, others were working on Java/C# homework and I was working on my next project. My next project is rather interesting in that it has required research on my part as to how to accomplish what I want safely. Being in the lab surrounded by people also working generally gets me working on my projects as well. I've got a general layout of the electronics involved in my head, and I know what I need to do it safely, so now I need to start gathering the parts, sampling certain chips from manufacturers and sourcing other parts that I can't sample.

All of my research gets collected in various locations, right now most of it is still in my bookmarks bar, which is starting to overflow so much that it is becoming a useless tool, I've been trying to look for a tool that can help me organise my projects far more efficiently and in a way that will allow me to add notes to web pages, or at least to links.

My phone screens with the large company I mentioned in my previous post went okay. The first phone screen I was extremely nervous and was unable to really understand the guy on the other because of a bad phone connection (It was his end, my phone had full signal strength). Not only that, but I felt that he wasn't really interested and I couldn't get a good vibe from him. I was so nervous my brain melted together multiple programming languages to create a mish-mash of crap that wouldn't compile unless you happened to write a parser that could take JavaCPythonJavaScriptRubyC++Scheme syntax. If you have done so, well kudos to you! The second phone screen went much better, this interviewer was interested in my Near-Space balloon launches which helped ease my mind, and while on the interview he was able to give me feedback, tell me a little bit about himself and just in general provide some banter while I was trying to program which really helped. Hopefully they average the two of them out, and I get a passing grade. Now the waiting game starts all over though, so I hope to hear back from them within the next week. I really hope I didn't screw it up for myself.

2010 -- Where is HAL to tell me that it can't do this?

The absence, or rather outdated blog posts on this blog have a myriad of different reasons for existing, and while I feel guilty for not having updated nearly as often as I believe I should have it was with good reason.

2009 was my year. It was the year that I completed an awesome internship courtesy AEC Consultants, and it was also the year that I completed my last two semesters (I took a break over the summer, my first break in eight semesters of non-stop schooling). This past December 22nd, 2009 I turned in my last assignments and my paperwork for my degree application. If everything goes right (and that is a big if, considering UAT has screwed people over before), I will have finally graduate with a Bachelor in Computer Science: Software Engineering, or something along those lines. It took me nine semesters, over a three year period to complete my degree.

Only recently has it begun to sink in that finally I am considered to have the knowledge and the know-how to be responsible enough to WORK somewhere. Society believes that people that own a simple little piece of paper that says I have a degree means I can be a meaningful part of society. Little did they know they were wrong, but let them dream! ;-).

Yes, this also means that this time I am looking for a full-time work position. In the past year I have found that Phoenix is not exactly the greatest city for finding work in the software engineering field, however I will keep looking.

There is one thing going for me, a major company located in California contacted me, and asked me if I would like to work for them. I eagerly answered yes, and I am now going through their very rigorous and stringent interview process. To me it is an interesting challenge and so far I am actually enjoying it.

A new chapter has started in my life, and it was started in full with the change from 2009 to 2010. Kind of fitting that my life takes a major new turn, with new roads and new obstacles after society as a whole celebrates having lived yet another 365 days through four different seasons (there where seasons exist, Phoenix does not count).

Grilled Cheese Sandwich, Re-invented

While I may not be a master chef coming up with great new ideas to make people's mouths water, I do enjoy experimenting with new ideas. Two of my favourite easy to make food items are "Eggy in a Basket" and ever since Katie showed me the "real" way to make one, the grilled cheese sandwich. Grilled cheese sandwiches are absolutely amazing, however there are improvements that could be made.

After Katie butters two pieces of bread, she throws on some parmesan cheese along with some garlic salt, then in a hot skillet one side goes, stack some shredded cheese on top, and place the second piece of buttered bread on top, butter side up. Wait for the bottom piece to brown, then flip the whole thing, grill until the bottom is brown and crunchy. Absolutely tasty, I am making some modifications in an attempt to make it even better by adding an egg to the mix.

What you need (Makes 1 sandwich):

1 Egg
2 Slices of Bread (Sourdough works really well, anything sliced thick)
1 cup of shredded cheese (Or more, this is too taste)
Parmesan Cheese
Garlic Salt and/or Italian Seasonings (as desired)

Here are the steps, along with pictures:

1. Butter the bread on one side, and cut a hole in the middle of one of the slices.

Add on some Italian Seasonings or Garlic Salt to taste, and cover in parmesan cheese.

2. Place the slice of bread with a hole in it, butter side down in the pan, and crack the egg into the center

Cover with a lid to help the egg harden.

3. Once the egg whites seem to have mostly solidified, flip it over. Now stack cheese on top.

4. Place the other slice of bread on top, and cover with lid again.

5. Once the butter on the top slice of bread starts melting and the bottom slice of bread has sufficiently hardened crusts, flip the whole thing over.

6. When the bottom slice of bread has sufficiently browned and has become nice and crunchy it is time to consume it

7. Cut it down the middle, depending on how long you cooked it the yolk should still be a little runny or soft:

(please be aware that eating raw or undercooked foods can pose a hazard to ones health, I am not responsible for any illness because of your inability to cook foods properly)

8. Enjoy the Eggy in a Grilled Cheese Sandwich.

From the creators of SPIN comes Ink

Two or more years ago in a post named "SPIN -- Awesome" posted a YouTube video which was absolutely fantastic, it was a short named SPIN. I have started reading Reddit lately, and came across a post by the creators of said short: Kiowa Winans which have created another awesome movie that is getting a lot of rants and raves: Ink.

In the Reddit post they tell people how many times it has been downloaded and also ask for donations to help their studio thrive, as well as getting the word out to many more people. The movie is now available on NetFlix as well at NetFlix Ink page. It is available for a watch now, AND a small kickback will be given to the DoubleEdgeFilms studio to keep making great movies.

I have yet to watch the movie Ink myself, I will post an update later today or tomorrow when I get a chance to sit down and watch it!

WriteRoom and other apps available free!

Well, MacHeist is at it again, they are giving away free software this time. WriteRoom is included which is actually one of my most favourite applications that I own for my Mac, so go grab it: http://www.macheist.com/

Moving from mod_fastcgi to mod_fcgid

Errors, all they cause is trouble. The dreaded 500 error showed up when visiting my favourite tech website, the one I am the administrator for. This time I had enough, there was going to be no more playing around with PHP settings, attempting to figure out why PHP was suddenly dying and or why mod_fastcgi refused to retry a select() when it failed due to a system signal.

The server in question runs Apache in MPM worker mode since a threaded Apache is going to be faster than a pre-fork, besides this server does not have as much memory so it seemed to be better to have multiple threads rather than multiple processes, each of which would have their own memory segment. There however is the issue that this server also needs to run PHP, the accepted method to do so is to use mod_php along with Apache; however PHP is not thread safe.

The alternative is FastCGI, basically it spawns PHP processes as a separate stand-alone process, with their own memory space, much like Apache pre-fork, however now when one process grows to big, or when a process is no longer needed it can be cleaned up, keeping memory to a minimum. Also, FastCGI is perfectly thread safe, this means that with Apache running in MPM worker mode we could now still run our PHP scripts even when they were not thread safe.

Setting up mod_fastcgi is not that hard, it takes some httpd.conf configuration values, and off course the loadmodule is assumed here:

# Set up mod_fastcgi
<IfModule mod_fastcgi.c>
    FastCgiIpcDir /var/tmp/fcgi-ipc/
    FastCgiConfig -autoUpdate -singleThreshold 100 -killInterval 300 -idle-timeout 240 -pass-header HTTP_AUTHORIZATION

    AddHandler  fastcgi-script              .fcgi .fcg .fpl

    Action      application/x-httpd-php5    /fastcgi-bin/php5.fcgi
    AddType     application/x-httpd-php5    .php .php5
</IfModule>

# Set up the script alias, basically anything in this directory gets executed as a fastcgi script
ScriptAlias /fastcgi-bin/ "/usr/local/www/fastcgi-bin/"
<Location /fastcgi-bin/>
    Options ExecCGI 
    SetHandler fastcgi-script
    Order allow,deny
    Allow from all
</Location>

Because of errors that mod_fastcgi was throwing out at me, I figured mod_fcgid is worth a try. However all of the configurations I found required me to add an FCGIWrapper line into each of my VirtualHost blocks, which was an immediate no-no since there is well over 100 of those on the server, and I'd rather spend my time doing other things.

With some trial and error, and some Googling I put the following together for mod_fcgid, tested it out, and once it worked perfectly set Apache off running with the following configuration:

# Set up mod_fcgid
<IfModule mod_fcgid.c>
    AddHandler  fcgid-script                 .fcgi .fcg .fpl
    IPCCommTimeout 60
    SocketPath  /var/tmp/fcgi-ipc/

    Action      application/x-httpd-php5    /fastcgi-bin/php5.fcgi
    AddType     application/x-httpd-php5    .php .php5
</IfModule>

# Set up the script alias, basically anything in this directory gets executed as a fastcgi script
ScriptAlias /fastcgi-bin/ "/usr/local/www/fastcgi-bin/"
<Location /fastcgi-bin/>
    Options ExecCGI 
    SetHandler fcgid-script
    Order allow,deny
    Allow from all
</Location>

Notice how similar they both are, that was the whole goal. mod_fcgid was supposed to be a drop in replacement, and thankfully it was. PHP was served as it once was, with a twist.

The php5.fcgi script is as follows for those of you trying to set this up as well:

#!/bin/sh
# To use your own php.ini, comment the next line and uncomment the following one
#PHPRC="/usr/local/etc"
#export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
exec /usr/local/bin/php-cgi

Some things that that intrigued me is that my php processes seemed to be capped now. Where mod_fastcgi would spawn processes but never remove them or kill them when they were no longer needed, mod_fcgid keeps the running php processes to a sane limit instantly starting new processes when required to handle the requests coming in. This means that the server now has more free memory for MySQL, or file caches which has helped speed up other types of transfers as well. Even with the relatively short time that mod_fcgid has been in place it has been faster, more reliable and more sane than mod_fastcgi. Whichever one you pick, make sure to benchmark your server and check your error logs to solve common issues, the issue may not be what FastCGI module you picked but rather PHP itself that is causing the errors!

Weekends, how they disappear

The last two weekends I have not been at home. Last weekend I went with my room mate about two hours north of Vegas. We went to help his mother with her computer which she uses for her work. She does spy photography of test cars and prototypes. Really interesting work which takes her all over secret locations throughout the entire world.

Luckily my room mate drove the entire way since it too was a long drive, 8 hours to be exact. We stopped in vegas and I rembered how much the city sucks. It is entirely fake, it is all set up.

Small town in Nevada was a different experience, no big stores, two gas stations and two or thee bars for a total of 1002 inhabitants. No entertainment what so ever, it was extremely refreshing, and I really liked the feeling of really not being able to have any worries.

The drive back we took a longer road, more curvy and a lot more fun, with absolutely beautiful scenery. I don't know what it is about the desert, but the different colours are really amazing.

I come home, work 20 hours in three days, because it so happens Friday the office I work at is closed because the 4th of July is on a Saturday this year, and I missed Monday as a day for work. Thursday night I crawl behind the wheel of a uHaul truck with a car trailer attached to it.

There has been some interesting times this entire trip, I have some new experience of how exhausting it actually is to drive a uHaul truck all the way from Phoenix to Sunnyvale in California. We left at about 2300 on Thursday and arrived at around 1900 Friday. We stopped a few times along the way, to get some nap time in. I had been up for longer than 24 hours at that point and I could not keepy eyes open and on the road.

Everything got here safely, which was the main concern, considering the truck was towing my friends brand new car. She would have killed me if anything had happened to her car, so it is probably for the best. Nothing in the truck broke either, which means I completed my mission successfully.

California drivers are really fucking insane. I have never sworn at drivers that much as on this trip over here. No respect for other drivers in any way shape or form. Nuff' said.

I sometime wish that the roads in the united states was more like they are in Europe. There the drivers know that slow traffic stays in the right, and you move to the left to pass, yes this also works on highways with 6 lanes. It would be safer and make it a lot less mentally demanding to keep track of everyone that comes barreling at you at high speed, or cuts you off.

The drivers all over the united states need to be educated on what proper driving is, how to drive safely and not cause accidents by following some simple basic rules.

I'm currently on the train from San Francisco to Sunnyvale, we had a great dinner at a really awesome Chinese restaurant, and then we watched the end of the 4th of July fireworks. The drive back is still looming, but hopefully everything goes according to plan!

Edit:

The drive back went well, it took a lot longer than I had hoped or expected, and I really wish it was shorter. Back in Phoenix safe and sound though!

MAX232 level shifter

While I have been playing with hardware for a while, I still am not entirely sure of myself when I am reading data sheets. I needed a way to level shift standard serial (RS-232) to TTL/CMOS levels. Not to long ago I had ordered a few MAX232's from Ti with the idea that I would be using them to build myself a simple cable so that I could connect my USB to serial cable to my Fonera.

Well, today I finally got my act together and got all the parts I needed, threw them on a quick breadboard and powered it on. No magic smoke, all is well so far, but I don't really want to plug my Fon into it just yet. Those are rather expensive to replace if I made a mistake, although at this point it was rather unlikely. I figured I'd use a Parallax SX28 I had lying around. SX 28 chips are dirt cheap, so even if I did make a mistake and accidently fried one it would not be that big of a deal. So I gave the SX28 the following code:

' =========================================================================
'
'   File......
'   Purpose...
'   Author.... Bert JW Regeer
'              Copyright (c) 2008 Bert JW Regeer
'              Some Rights Reserved
'              -- see http://creativecommons.org/licenses/by/3.0/
'   E-mail.... bertjw@regeer.org
'   Started... 2009-06-08
'   Updated...
'
' =========================================================================

' -------------------------------------------------------------------------
' Program Description
' -------------------------------------------------------------------------

' Simple program that reads in a byte and outputs it again over serial.
' Kind of like the echo service on Unix computers!

' -------------------------------------------------------------------------
' Conditional Compilation Symbols
' -------------------------------------------------------------------------

' -------------------------------------------------------------------------
' Device Settings
' -------------------------------------------------------------------------

DEVICE          SX28, OSC4MHZ, TURBO, STACKX, OPTIONX, BOR42
FREQ            4_000_000
ID              "MAX232"

' -------------------------------------------------------------------------
' I/O Pins
' -------------------------------------------------------------------------

Sout	PIN RC.1 OUTPUT
Sin	PIN RC.0 INPUT

' -------------------------------------------------------------------------
' Constants
' -------------------------------------------------------------------------

Baud	CON "N9600"

' -------------------------------------------------------------------------
' Variables
' -------------------------------------------------------------------------

tmpB1	VAR Byte

' =========================================================================
' INTERRUPT
' =========================================================================

' RETURNINT

' =========================================================================
  PROGRAM Start
' =========================================================================

' -------------------------------------------------------------------------
' Subroutine / Function Declarations
' -------------------------------------------------------------------------

' -------------------------------------------------------------------------
' Program Code
' -------------------------------------------------------------------------

Start:
	tmpB1 = "a"

Main:
	SERIN Sin, Baud, tmpB1
	SEROUT Sout, Baud, tmpB1
	GOTO Main

(Template thanks to Jon Williams from EFX-Tek.)

As the code suggests, this is a simple echo, it turns the device into the echo service that used to be commonly found on Unix servers, which basically echoed what you had sent them right back at you, with one twist, this one just echo's each byte whereas with the service you generally had to send a newline.

Realterm with echo shown

As you can see it is working correctly, the first H got gobbled up somewhere along the line, this could either be because I am using the internal clock source for the SX28, which is known to be rather unstable at times, or because I am running this all from a virtualised Windows XP and the timing on the USB to Serial device is not correct.

I have hereby proved that my MAX232 wiring is all correct and functions as expected, and all without any magic smoke.

Sun Microsystems: It Was Short and Fast

There is an announcement that was made today that makes many people feel sad, Oracle has agreed to buy Sun for chunk change. While I have never been a huge fan of Sun, mostly because of the Java programming language and a long lasting hatred for it, lately I have become increasingly aware of Sun and its products. Mostly related to OpenSolaris the free and open version of the Solaris 10 operating system. Other products have included the VirtualBox that Sun recently acquired and off course MySQL is still a big part of my life through the websites I manage.

Sun has slowly been declining, they used to be a monolith, a large giant that could stand up against IBM, Microsoft and various other companies. The issue has always been that they did not have a good PR system, they went on word of mouth and by selling to their clientele, they never made it clear what they wanted to do and where they wanted to go. Many people have no idea what Sun is doing, what projects they are working on, what they currently own. They have no idea about the innovations in the various products Sun makes, Solaris contains many improvements and ideas that are not available in other operating systems yet. Sun was a company made by programmers for programmers. The clients and the service contracts were secondary.

Selling Sun to Oracle is a cop-out. There is no way around it, Sun could have made radical changes, they could have changed what they offered and used the various projects they owned to create a new streamlined experience that would have given them an edge over the competition. Sun owned a lot of code to do various things and never made it a complete solution, never made it easy to use and even with the tools they had given you had to use 3rd party scripts to set up a basic structure. Most notably setting up a complete solution to do single authentication, much like Microsoft's Active Directory.

The biggest question is what is going to happen to the various products that Sun owns that are open source? Oracle is one of the biggest closed source companies in the world, they don't even allow benchmark tests to be completed against other database systems. What will happen to MySQL, OpenSolaris, GlassFish, VirtualBox, and xVM? Will Oracle close Java again? Will they make it harder for the community to work on OpenSolaris? These questions are what are causing the biggest question marks and there are no good answers. The real answer is we have to wait and see. OpenSolaris is an awesome open source operating system and I will be extremely sad if Oracle takes it down or makes it harder to participate.

I am extremely sad to see Sun Microsystems be sold, they have been around for a long time, what will happen to the brand? All the good people working at Sun, all the projects they own?

(Full disclosure: I currently own Sun Microsystems shares)

Syndicate content