Posted on

Innovation through Miscommunication

Funny story right. A friend of mine is working with some interesting people right, and he tells me about this graphic/web designer, who was asked to make a drop down during the daily standup. So my friend is telling me about how he is doing a total facepalm cause this guy is estimating the addition of a drop down as an eight hour task, right. I mean, that was all that was there, find a space on the page, design a niche spot in photoshop maybe, where this drop down will go nicely and contain some hard coded values. I gotta say, I agree with my buddy cause you think drop down you think select tag. Bada bing Bada boom. Heck the wireframe had a freaking select tag based drop down in it. But apparently the designer didn’t quite get it, so it took him a while to even answer back. He took like 5 minutes to make sure what he was supposed to do, looking all confused and the rest of the team totally accepted his estimate. So about 8 hours into his task, it becomes apparent that he is actually making a fly out pane that drops from the top! And my friend tells me its beautiful. With a great design, and nice tween, a great value added to the project.

But who would have thought it, that what someone else might interpret as a miscommunication, is actually innovation!

Posted on

Raspberry Pi

Just got my Pi in the mail. So I open the box and quickly began to wonder.
“How the F*ck do I power this thing up?”
I ordered the darned thing like 3 months ago, so I sure as hell don’t want to fry it.

I am planning on turning my old LCD TV into a Smart TV with a bit of duck tape and some luck.
But the best laid plans of mice and men matter not when you can’t find the right power adapter.

Sure, sure, it uses micro USB you say. But seriously,  do you know how to power it up?

Posted on

Working with SlickGrid

Got a chance to play around with SlickGrid at work. Honestly don’t think I was seeing its full potential.
There was a lot of bad code written on the page, duplicate body tag, all kinds of horror.
Work is interesting, this time around. Not everyone is 1337 like on my last team.

So I have been tasked with setting up a DataTables example.
I think TableKit is also cool. I first used it back in 07.

 

Posted on

A Comment on Phil’s “laravel-is-awesome”

I guess you can’t compare a platform like Grails with PHP. But if your writing a “large scale application” or what some might call, Enterprise, then is it necessary to have support for simple web hosts. I don’t see how being able to deploy everywhere is something that an Enterprise application has to even be concerned with. Truly being bored with PHP might mean that you take a look at a newer language, one that eliminates the need for awkwardly typed characters and simplifies development. Laravel actually reminds very much so of Grails. Groovy is awesome. Its leap over Ruby, and lands on the JVM. And lets not mention Ruby as an alternative to PHP, because that language makes a mockery of what beautiful code should look like. Basically I think we should not say ‘Laravel is better than CI’ but that PHP is not going into the right direction at all. Backslashes for namespacing, really?

Posted on

SVN Time Lapse View

This software is, http://code.google.com/p/svn-time-lapse-view/,  a total fail.
At least for me, I couldn’t get it to work at all!

I am trying to find the difference between revisions of a file. And remembering Perforce’s time lapse view, I quickly tried SVN’s revision graph feature, hoping it would be similar. No dice.

I quickly googled svn time lapse view, and surprising found a software right away.
But following the directions, and trying to load file to review, I ran across nothing but error prompts.

Please guys at CollabNet / TurtoiseSVN, lets roll this feature into SVN already! How can anyone survive without it. I don’t know. Just incredibly disappointing.

________

Update, I have found where to put the revision number with the diff in turtoiseSVN, and other ways to get the comparison’s I need of different file revisions.

Posted on

Second sprint as PHPUnit tester: Learning Fixtures and YAML

Since I’ve been building my knowledge base as a unit tester here, and showing that I am capable at it, I’ve been stuck with even more testing responsibilities.

The new tests are far more complex, and will require that I feed our system certain sets of data, in order to create the post conditions.

This most likely means generating fixtures and using YAML format files.
Although CIUnit has a “php generate fixtures” command which I can execute, this only dumps the format of the database, and “manual labor” is required to setup the data.

As I metioned before, I dont like having to sit, and click all day just to get something basic going. So I am looking for an automated solution, since I would like to use my entire dataset, and be able to quickly experiment and switch between them. Data entry is not an option.

Export the data into yaml files though, has proven to be a headache. Most posts on the interwebs seem to point to using Doctrine CLI or ORM-Designer as the correct tool of choice for solving this problem.

First I tried to use command line based solution in XAMP 3.1.0 by installing doctrine using pear.
But I had a rough weekend, and my brain is not able to process how to actually use the Doctrine CLI to export the data to YAML files.

So at the current moment I am trying out ORM-Designer. The application just explodes in my face with all kinds of options I don’t care about at all. I am not trying to design a project, or do anything but export the existing data into YAML!

I realized that when something is not on the interwebs, that means its because its right under my nose, and that I am being foolish for not finding it. (very rough weekend).

Loading phpMyAdmin, and going to export the table I found the grail I was looking for! phpMyAdmin is capable of exporting into YAML! Great, now lets see if I can get my tests working with these fixtures.

 

 

Posted on

Down time and charging clients

I don’t know.

I hate days when you don’t have a lot of work. Or you hit a blocker.

Its like. You just started, you don’t have much to do, and what, do you not charge for a full day?

Do you hang around shooting the breeze until the clock hits the right position?

Do you go home and charge anyway, knowing you will make up for it later?

Awkward.

 

At first, when I was younger, I was so careful about my arrival and departure time.

But then, after seeing how difficult this industry is, with all these head hunters, and how hard the contracts are, with all the stress experienced.

I’ve decided, I will charge a full day every time.

If you hired me, you should employe me. For me the time sheet is just another invoice.

I’m self incorporated and the cost of doing business is high. Not to mention there is mark up on my rate by the agency, so I am not making as much as you think cause they always fight to increase their own profit margins.

Gotta learn how to cut out the middle-man, and get hired with big companies directly.

Then I would just have to send one invoice, it would be less awkward, and I would make more money too.

 

 

Posted on

Shout out to Mike Funk and Andrej Farkas

 

Its so amazing when programmers, that you have never met in person before, reach out to you and help you out, when you need it!

I just want to say thank you to these guys:

Mike Funk
Andrej Farkas

They are both active CI community members.
Although, Andrej has said he now uses a more ‘Romanian’ framework, and he has ditched CI behind.

I guess it must be very frustrating coding in a foreign language. I mean, there is this joke about a Russian programmer who learned English in a couple of months, and when asked “How did you do that?”, his response was “Its easy, its just like C++!”.

Andrej  has interesting articles about Laziness being good for OOP design, and about writing unit tests first.

 

 

Anyways, thanks again guys!

Posted on

Reverse Engineering CodeIgniter, Sparks, to get CIUnit working

I ran into more issues with the spark for  cURL and the spark for Rest.
These are two awesome contributions by Phil Sturgeon to the CodeIgniter family.

Honestly this technology platform is way behind.  Node JS seems better equipped to manage packages with npm and nvm. And why do we have PEAR, PHAR, and Composer and a framework specific SPARK.  We are seeing the tower of babel problem when it comes PHP frameworks. Too many, too fast, the community has not congealed behind a single choice.
So developers from a huge PHP base are ending up being spread thin, some contributing to Yii, some on CodeIgniter, some on Laravel.

See if the programmers who made one of the other frameworks had worked as contributors to CodeIgniter, I probably would already have better CIUnit integration.

Anyway, so the problem was that the AutoLoader for PHPUnit command line execution of the project was being used twice! And somewhere in the first process, the sparks were added to an Array instance used to keep track of which sparks had been loaded.

Removing this, ‘duplicity’ check, made the application fail, because we were loading CURL twice. 1.2.0 spark and 1.2.1 spark were both being loaded and failing. So when I removed the duplicate CURL spark, the PHPUnit tests started to fly!

So I just put a CLI check in the function that removed duplications, in My_Loader.php:

# If we’ve already loaded this spark, bail
if(array_key_exists($spark_slug, $this->_ci_loaded_sparks)) {
if( php_sapi_name() != ‘cli’ )
return true;
}

 

This way, if and only if I am executing this CodeIgniter project on the command line, will sparks be loaded freely.

Posted on

Ubuntu Samba Torture

I recently did an update on my home network file server, and of course samba stopped working. 2 hours wasted already trying to fix it. The problem is in the GUI the samba config program never actually executes, just closes silently failing.

And when I try it on the command line, I get this goodness:

# gksu system-config-samba
Traceback (most recent call last):
File “/usr/sbin/system-config-samba”, line 45, in <module>
mainWindow.MainWindow(debug_flag)
File “/usr/share/system-config-samba/mainWindow.py”, line 116, in __init__
self.samba_user_data = sambaUserData.SambaUserData(self)
File “/usr/share/system-config-samba/sambaUserData.py”, line 46, in __init__
self.readSmbPasswords()
File “/usr/share/system-config-samba/sambaUserData.py”, line 56, in readSmbPasswords
if string.strip(line)[0] != “#”:

____________

This sucks so bad. But its not too bad, cause I have nothing mission critical on that file server anyway.
Honestly I was just experimenting with Ubuntu / Samba and using that fileserver for entertainment / media storage.
I am getting another box soon for Windows, we’ll try out SMB there too.