Automation Abstraction

Grass6-gism

For all things web development you have to be able to test them and confirm that they work. With the progression of AJAX and DOM altering JavaScript testing these web applications has become more and more of a chore. Unit tests and frameworks provide a certain level of quality assurance from the back but the user’s experience needs to be confirmed as well. The last four years of work at Broadcom has afforded me a number of opportunities to diversify and expand my skills palette, but no matter what I do I always find myself back in the role of a tester, unfortunately.

Continue reading “Automation Abstraction”

Not a .net Junkie, yet

Half-Life 2   s gravity gun is capable of turn...

I have been asked to begin making a gradual move into the .net languages, as there was a recent organizational change where my manager no longer works with Perl as much as he used to and wants to take me along with him to make sure his life is easy. But making the migration into the .net frame of mind is something i haven’t actually touched in a while and my friends seem to have forgotten what it was like to be a student. I on the other hand am still in school and well appreciate the utility of my abilities.

On the other hand, i could just freak out and buy up a bunch of O’Rielly books…

Continue reading “Not a .net Junkie, yet”

Perl for dummies

In the hours of the early morning here at work i enjoy the silence. It allows my mind to unravel the craziness of the previous day and take quiet walks around the office space. Recently i have been noting the books that people have on their shelves, and its odd – many people have the O’Reilly Programming Perl novel sitting up on their desks/bookshelves here. I say this is odd because so many people dont know a god damned thing about perl or have a barely functional knowledge of how it works or how to code in it.

One such example is pertaining to a failed attempt to be a software developer. An application with a “Template engine” that is controlled by the function you run previously. This is one aspect of this application that should let you all know how complicated this has been devised. I am convinced that i could simplify the code base considerably, given the freedom to do so, but alas – i cannot.

Its odd that people purchase or borrow or share books when they are not willing to actually read them. There are a number of very interesting and necessary tidbits that sit just below the surface of Perl that are more than useful; that are more than powerful; that are able to correct code that you have just spent four hours working on instead of reading four hours yesterday. It’s called a Map. Use it.

Languages Span!

I have often been caught in the cross fire of the ongoing and awfully brutal and emotional language wars. I am a C programmer by choice and a PHP/Perl Developer by trade, so I get some of the most heated and misfortunate of the angry or emotionally charged responses from people who just do not know a god damned thing about what they are talking about. Scarier is when I hear absurdities from people who actually do know something about their topic. For some reason they want to stick their toes into my pool and do not like the temperature of the water so they go into a tirade about how I should change the color of the water with some dye and install a heater, oh and the chlorine content is too low or too high and algae will form; who knows, maybe you should add this algae snake as well to keep it from getting to the bottom! I apologize for the extended analogy here but it stands. It is important that Comp Sci. and Developers alike learn at least one thing about languages before they enter the market and end up coding themselves into a corner – There is no such thing as a language level, Languages Span!

Continue reading “Languages Span!”

Code Example #5 – WinGrepReplace

In the day to day happenings of web development many of us get into binds and have problems getting out of them. Yesterday a good friend of mine came to me with a huge problem. Her website of more than 700 files needed to have certain entries replaced and the amount of time it would take to go through them all and replace the lines individually was not worth the effort. Thankfully she knows that i dont do anything that difficult by hand, i invent something to do the work for me and give my computer a smack on the butt and just wait for the results.

Here is the Perl code to do just that:

#!/usr/bin/perl -w
################################################################################
# WinGrepReplace
#
# Replace a given line in all files in a directory of files.
################################################################################

use File::Find;
use File::Copy;

die "Usage: $0 directory find [replace]"if (@ARGV > 3 || @ARGV < 2 ||
!-e $ARGV[0] || length $ARGV[1] == 0);

our ($dir, $find, $replace) = @ARGV;

find(&func, $dir);

sub func
{
   return if !stat || -d;

   open(FILE, "<$_");
   open(FILEO, ">$_.new");

   while (($line = ))
   {
       $line =~ s/$find/$replace/i if ($line =~ m/$find/i);
       print FILEO $line;
   }

   close FILE;
   close FILEO;

   move("$_.new", $_);
}

Although there are a couple of hacks and vulnerabilities in this block, it gets the job done nicely.

this past weekend was quite an exciting one

this past weekend was quite an exciting one

Today is my dad’s birthday, I saw some friends I had been neglecting for far too long, and I kick started work on OMS. For those of you who are new to Gneu and our delusions of grandeur I’m sure this would come as a bit of a shock, but we intend to make a game. Not just any game, mind you, but one that is not made for everyone. It is going to be tailored to the concept of emulation of reality. We have quite a few notes about our goals up on the wiki, and I have another 12 paragraphs to add in the coming weeks. Some important links are at the end of this article.

Continue reading “this past weekend was quite an exciting one”

Changes are in the wind…

school has begun, and this winter quarter I am expanding my math as usual, but also undertaking something I am not quite sure why I dreaded. Java is being added to my arsenal and as with the other languages I have developed I plan to release whatever applications I create. I have only been in class a couple days but I really doubt it will provide me with much of a challenge to be able to cause me the hours of frustration that I spent in the computer lab with my introductory courses.

I have also begun working on my UT3 Packaging utility…

Continue reading “Changes are in the wind…”