zombievirus

The post in which I make a frowny face about writing code for agencies

While I was at Optaros I got to work on a prototype for a startup. It was pretty rad. The people were excellent, I loved their idea and I loved my prototype.

Basically what I made was a drag and drop tool you could use to make store windows that people could shop off of. I feel like it’s ok that I write about this now given that I found a press release about their upcoming launch that says pretty much the same thing.

Under the assumption that I’d be the one building this site after the Blueprinting phase, I made my prototype with reusable code. I loved the product, so I tested the heck out of that prototype because I was constantly playing with it. It was really fun.

And here is where the bubble bursts. We did not get the go ahead to build the site. Originally we were going to give them a site which they could look at, and use to show investors, but not my actual prototype code. The logic being that this was usable code and they paid for a prototype. Well then Amazon went down and lost EVERYTHING. One of the members on our team zipped up my code and send it on over to the client, or ex-client, whatever. It was already pretty much over at that point.

Last week I got a DM from a coworker at Optaros about the startup’s new agency and their little press release about how awesome the product is and how they totally just build this super awesome window creation experience. They also linked another project similar that was affiliated with the startup.

Sooo… yeah they used my code. The HTML, the Javascript, all of it was there, comments and all. Even the comments that said “This is a total hack, do not go live with this” were there. I know that as soon as it was passed off, it belonged to the client and they could do whatever they wished with it. So they gave it to the next guy, and the next guy used it all and stamped their name on it.

Honestly, I kinda felt dirty. Here is this agency I have zero affiliation with taking credit for something I made. What was worse was that I made the whole thing in 2 weeks, I tried my best to make it beautiful and when I looked at the code they added, it was about 500 lines of shit that could have been done in one. I AM NOT EXAGGERATING WHEN I SAY THAT. There is actually a chunk of code in that file that is well over half the document, that could have been done in one line of code. Which leads me to believe the agency doesn’t have the team savvy enough to build a tool like that. Also the rest of the site was pretty much an HTTP request nightmare.

The silver lining is YAY SOMETHING I MADE IS LIVE NOW! I can be happy about that. It was a good prototype, but that doesn’t change the fact that it was just a prototype. There was a lot of it that needed to be changed before going live and I never got to do it. It’s not as beautiful as I would have done it if we got the chance to make it.

I think it’s funny that when I help build a prototype hoping that the client will use the code, they don’t (Finishline) and when I build a prototype where I wouldn’t want the client to use my code, they do. It just could have been so much better and more polished.

HASH: Adam is a genius

This is code that makes total sense.

function search(type){
searchType = {
ITEMS: function(){
console.log('searchforItems');
},
BACKGROUNDS: function(){
console.log('searchforbackgrounds');
},
PROPS: function(){
console.log('searchforprops');
},
THEMES: function(){
console.log('searchforthemes');
}
}
searchType[type]();
}
search('ITEMS');

This might be duuuh for most, but was doing everything as private functions and the type was getting lost in scope so nothing happened. It was super annoying. Adam saved the day.

I might be turning into a Sasshole

Joel finally wore me down and got me to start using Sass.

At first I found it irritating. You have to run a watcher in terminal so every time you update the scss file, it updates the corresponding css file. I would not put in proper tabbing or a space and it would error. A week of dealing with that and now I am conditioned to perfect tabbing.

I am using SCSS syntax which has brackets. I love it because it comes out looking like this:

/*SCSS HERE - FAR MORE AWESOME. HAS NESTING*/
table.hl {
margin: 2em 0;
td.ln {
text-align: right;
}
}

li {
font: {
family: serif;
weight: bold;
size: 1.2em;
}
}

Which equates to this in CSS:

/*CSS HERE*/
table.hl {
margin: 2em 0;
}
table.hl td.ln {
text-align: right;
}

li {
font-family: serif;
font-weight: bold;
font-size: 1.2em;
}

This has made it much easier to organize and find code.

You can also declare variables in SCSS, things like color, padding, margins, rounded corners, boxshadows, AKA shit you retype over and over and over, and will have to edit on a billion elements should the design change.


$blue: #3bbfce;
$margin: 16px;

.content-navigation {
border-color: $blue;
color:
darken($blue, 9%);
}

.border {
padding: $margin / 2;
margin: $margin / 2;
border-color: $blue;
}

That is awesome. Right now I am using it on a prototype web application and it’s just me on the team so I am now sure how great this is when it comes to working in a group. I forsee a lot of having to convert css files to scss files every time I update. I am worried that if I can’t get my team to use sass there might be some issues with format and organization. I guess I’ll find out all that during Build Phase. Dah well.

So far my dealings with SCSS is A+++++++ would recommend to all.

HOW TO: Install MYSQL on a mac (the lazy way)

This week at Optaros, yes OPTAROS, the new company I work for that sounds a lot like a transformer and is equally cool, if not more cool than a giant robot, I have to install MYSQL on my fancy new Macbook Pro.

After consulting friends and acting as a telephone in a 3 way argument about the best method for installing MYSQL, I ended up using Homebrew. [other options: mysql disk img, macports]

First: Go to terminal and install homebrew by typing in:
ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"

Next: Install Xcode. This is easy, you just need to sign up to be a mac developer.

Last: In terminal go to your user/local folder
cd /usr/local

Then install MYSQL with homebrew
brew install mysql

Wait forever until it’s done installing. You now have MYSQL on your mac.

HAPPY NEW YEAR

Life update:

I got a new job! Starting TOMORROW, I am working for Optaros.

At some point in December I decided I wanted to look around at what was out there in the world of Agencies and Consulting. I hadn’t interviewed since I got my job at Molecular (now Isobar) over three years ago and I was terrified. I was worried about rejection. I was worried that I wasn’t good enough. I was just worried about change in general. After sending my resume out on a sunday and getting called back Monday morning by every place I applied, I quickly got over all of my fears.

This is what I learned from the experience of interviewing: I am not a moron. Not only am I good at being a front end developer, I even made it through the tech interview for a software development company for a senior level position. Talking to people during interviews about what I do for a living is the easiest thing in the world, because I LOVE developing. Not once did I feel like I was BSing the interviewer. I genuinely knew all the answers to the tech questions. Closures, classical vs Prototypal Inheritance, performance testing, cross browser testing, posting/getting, synchronous/asynchronous, etc- I knew how to explain it. After each interview I would buzz around in circles wondering when the hell did I learn all this stuff. This is all stuff you just do, you don’t talk about it. No client cares about if you are using closures. It’s amazing that in a little over 3 years I have learned so much.

Ironically, the company I picked had one of the lighter tech interviews. This isn’t a bad thing because their overall process and company structure was my ideal place to work. I am really excited about my first day tomorrow. The only bummer I have about working for Optaros is that they don’t have cubicals, so I don’t have a place for all the posters I just took home. I don’t know how long I should wait before I bring in a ton of action figures… I’m thinking not until February.

Leaving Isobar was bittersweet. I love everyone I’d worked with there and there had been some amazing projects. There had been some evil, wake up in cold sweat, projects as well, but I’m sure those happen at all agencies. I had given 4 weeks notice and through the four weeks I was getting more and more anxious about leaving. I have no doubt that I am going to hang out with my isobar friends outside of work and that’s all I want. I would be distraught if I didn’t think I would see Dave or Rob or Emile or Bobby again. On Friday I thought I might start crying hysterically when I left, but I had to work late to finish up some stuff and I was completely dry eyed. It wasn’t very sad and it just didn’t feel as in the good parts were over. The best thing about Isobar is the people who work there and I can hang out with them outside of work.

Tech Stuff
So far I’ve had a pretty lazy new year. I learned about Qunit which I hope to start using on whatever personal or company project I work on next. I’ve had a couple breakthroughs with managing event bubbling in jQuery while trying to make the most ridiculous form ever designed. One might say it “over-designed.” And lastly, I have been using a lot of CSS to manage state, in the OOCSS inheritance sense.

Art Stuff
I’ve been drawing every day. I have started both a tumblr and a DA account.

I am reading Drawn to Life: 20 Golden Years of Disney Masters which is freaking amazing! It’s like taking an illustration class.

I was told I got a lot better after drawing this:

The only cure for stress is Murder She Wrote and doodling.

I love me some formulaic television. Every season of Murder She Wrote is on Netflix. This show was made for drinking games.

I don’t even…

OK seriously. Why does this have to be so hard. Why do I have to call about 5 methods to do one fucking thing? I hate you java. I hate your stupid strongly typed face.

Servers and the command line…

My server would not run for the ATM simulator homework I was editing this weekend, so I sent it to Dave to see what was wrong. He said it worked for him and declared “Y U NO WRITE CODE THAT IS BROKEN?”

So I tried it again, and again, I got the dreaded error:

An exception occurred while communicating with the ATM
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:433)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:477)
at java.net.Socket.(Socket.java:374)
at java.net.Socket.(Socket.java:187)
at cscie160.hw6.ATMProxy.(ATMProxy.java:19)
at cscie160.hw6.Client.main(Client.java:12)

About here I am seriously losing my mind and falling deeper into a pit of despair and insanity. Why the hell does my server not work?

Today, Dave comes in and I learn about Telnet. THIS WORKS:

Go to the “bin” folder of my java project and start my server.

java cscie160.hw6.Server 7777

Then after it declares “Accepting clients” hit COMMAND+t (I am on a mac) and type in:

telnet localhost 7777

Rejoice as I finally see:

Trying 127.0.0.1...
Connected to localhost.

Thank. Freaking. God. My ATM works fine now.

Java threading

If you were to explain threading in java to a 3 yr old how would you do it.  Top 3 best answers (polled so I would have ideas on what to doodle):

a thread is like a little machine
you give it stuff
it does it
if you have many threads, you need to make sure they dont crash into each other
think go carts, not bumper cars

Threading is like a bunch of killer hyena you send to viciously hurt an enemy. You never want them to Kill the same person because they can kill each other

threading is like having a bunch of dogs to play fetch with
but you don’t want them going after the same ball


In java you have Processes and you have Threads. Processes are a self contained execution environment. They have their own memory. Think CTL+Alt+Del when you want to see what’s making your computer slow as hell, only to find out you have 13 instances of Firefox running for no reason. Those are all processes.

Threads are lightweight processes. Processes and threads are both execution environments, but creating a new thread requires fewer resources than creating a new process. You can have threads inside a process and most processes have one. They chare the resources inside the process (e.g. files & memory). You can have multithreaded execution, but you need to make sure that the threads aren’t trying to use the same resource (e.g. little machines not crashing into each other, hyenas not going after the same victim, dogs not going after the same ball) or everything will crash and burn.

TO BE CONTINUED… (and updated with code examples)
I’m posting this just so no one thinks I am some sort of Obese spiderman fetishist. :| Damn inside jokes.
I am waiting until my class is over to post homework examples, just in case my classmates are trolling the web for answers.

Monitor coloring…

Is the bane of my existence.

PART 1: Remote Method Innvocations (RMIs to the people who won’t remember that)

To get me to finish this homework I will trick myself into writing a blog post about RMIs, which is a thing in Java that no one uses anymore cause it’s old and stupid. There is a better reason that Dave told me, but I have already forgotten it.

Fact: I don’t even pretend to know what I’m doing in front of Dave anymore.

What the hell is an RMI?
An RMI is a system that lets java code from one virtual machine use java methods that are running on another virtual machine.  The best way to describe this with my brain meats is that it’s like ajax for java.  e.g.- Back end validation:

CLIENT: “HEY YOU OVER THERE, DOES THIS LOOK VALID TO YOU?”
SERVER: “Hrmmm…. 0!”
CLIENT: “HA! it’s valid. Beep boop. *computer noises*”

I like to anthropomorphizing everything about coding languages.  It’s kind of like turning it all into cartoons in my brain.  I’m a simple person.

What are RMI’s made from?  Surely it’s something evil since it’s java
Let’s assume you know java, or you have taken about 2 and a half months of it and know your way around programming an elevator.  RMIs are made up of interfaces and classesInterfaces declare methods.  Classes implement those methods  and sometimes declare more methods.

The best way I have to describe an interface is this to think this way.  An elevator has a bunch of floor buttons.  The interface is the button panel.  All it knows is you pushed  a button.  It does none of the heavy lifting, it just says “I got pushed :) ”  and the Class actually does all the work figuring out what to do next.

Objects that have methods which can be invoked across VMs are called remote objects. They become remote by implimenting a remote interface, which does the following:

  • Extends the interface java.rmi.Remote
  • Each method inside the interface has a java.rmi.RemoteException in its throws clause, as well as any other exceptions it might throw

RMI treats remote objects different from nonRemote objects. Instead of making a copy of the remote object to use on the receiving virtual machine, RMI passes a remote stub for that object. A stub is kind of like a local representative of the remote object for the client, and as far as the client knows, it is the remote object. The client invokes all it’s methods on the local stub, and the stub passes all of that method invocation onto the remote object. A stub will have all of the remote interfaces, but it will not have access to any other methods from the receiving VM.

Think of it all like a big game of telephone or a proxy, if you’ve ever used one of those to watch UK streaming television or used Charles to troubleshoot JS without a local environment.

Procrastination of homeworks lead to more doodling

Drawings.  See how much gets done when you don’t want to do your homework?

The black and white city scape was done after looking at a speed drawing tutorial by Concept on Mac.

Batman in a snow bikini is a response to some feminist (? or not) blog complaining that the cover of comics had too much female nudity. If they put more swanky batmen on covers, I would buy comics again…

Serif body fonts are the worst…

.. if you are my website.

:/  Trying to figure out the best Header / body text combo to get rid of this awful “constantia,palatino,”times new roman”  thing I have going on here.

I am considering:

Minion

Gill sans for body content…

Rockwell

Futura…. does this go with rockwell.

Georgia

Good ol’ verdana… always used on every freaking site I’ve had to do boring maintenance jobs for. Verdana might be a foreign word for boring

More coming soon…
Where the hell is corbel from?

Try Ruby & Rails for Zombies

Two fun toys to play with for anyone interested in learning Ruby  or learning rails.

TryRuby: An in browser tutorial.  A bit laggy but neat.

Rails for Zombies:  5 online videos and in browser assignments.

I think what I like about ruby the most is that it’s written like you are speaking it.  I like that ! means you are doing something, or rather manipulating something.  I haven’t built anything cool in ruby beyond tutorials, but I did read _why’s book and listened to the soundtrack.  This semester I played to take a class in Ruby on Rails, but the professor moved so it wasn’t offered.  Huge bummer as I absolutely loathe Java, the class I am taking.

Some day I shall conquer you ruby! SOMEDAY!!

I like this pallet for coloring skin

#fef2a0#e6ca67#ff8552#b28b84#9a6b7b#b7cddb

ADDITIONAL POST: MS vs Spoon Browser Testing

I feel this is important and needs to be said.

Microsoft, I am disappoint. You guys are bunch of jerks and your stupid ie8 keeps asking me to configure it WHEN I ALREADY HAVE!!! *points at the desktop icon and gives it an icy glare*
Here are some IE testing alternatives now that MS has decided to cling to it’s crown of Party Pooper.

  • IE Tester: apparently in some cases Flash will work now.
  • IE8 lets you render pages as IE7: It’s in the preferences or tools or something. Honestly it’s kind of crappy and I don’t think it’s a true ie7 render.
  • Windows 7: Windows XP mode VMs : this intrigues me because I want to know how this performs if you are running windows 7 on you mac via parallels. “Hey dawg, I heard you liked virtual machines, how about I put virtual machines in your virtual machines?! :D

I have a MBP as my laptop “work” machine (my company laptop has more in common with an easy bake oven than a computer) and a gaming PC from Doghouse Systems as my super happy funtimes home desktop, so no parallels for me so far.