Sunday, July 31, 2011

Flight home handwritten post (cursive)

I was bored on my flight home this week from the client site, so I thought I would hand write a blog post, then retype it and post. That's no fun, so I scanned it and here it is. Can you read it? I don't print, I write in cursive, I think it's faster.

hand written flight home blog posting

See also:
And the other travel related posts from my week:

Wednesday, July 27, 2011

Users think it's easy

More from my travels this week... user's think "it's" easy... software that is.

Oh boy, I wish it were. You see something in a demo, on a competitor site, a sales pitch, zing, and let’s get that on our site. We "bought" (doesn't have to mean literally) into a solution, that solution said we'd be able to easily add new features, customize and also get ongoing maintenance. Of course someone said it would be easy, would you "buy in" if wasn't? Or would your decision makers? The costs of changes are low? Sold!

Let me tell you a little secret... software isn't easy. You can't just switch over to using a mobile CSS to be mobile. You can't allow your content editors to create complex content in content management tools. At some point, it gets technical and you need real people doing real work to make something happen. At that moment of need, you likely aren't fitting into the box you bought into, so the changes to the box coming later aren't going to work on your circle you are about to build. So don't get upset, you've accepted some creativity or divergence for differentiation rather keeping it plain. Applaud yourself and accept the risk. You might get lucky and raise the bar and the result if you are noteworthy within your peers and they are adopting your work rather than you adopting theirs.

It's also easy (easy for the users) when users stop asking questions on how to properly do something. It’s easy to them because they don’t need help. Once the non-technical folk are taking on their own initiatives to try and round the corners of that box they bought and it’s quiet while they are doing it (not asking questions for guidance), the circle they are trying to bend from the square is going to be a triangle. Their triangle result will likely work (solving some problem), but to the builder's surprise once they get wind of what's happening is the reminder that users will always use your software in ways you never planned.

It’s a fine, and difficult, act of balance when a creator chooses to enable a user to be advanced. Do you want to accept that you as a creator haven’t properly anticipated another’s usage patterns? Most might mind, but the truth is you have to accept this. There should be usage pattern restrictions to detect anomaly behaviors. They can be blocked, alerted on, or reported on. I know click paths are pretty close on analytics, but path blocking might be a nice step, or at least the chime in for “do you need help?”

See my related travel post from my airport/plane observations as well:

Airport and airplane (flying out)

I flew out this week for work... I was in an airport and on an airplane...

Why isn't power for sale in airports?

I think power usage should be sold in airports. Why not? The airlines need money. They can time box users, limit their usage, and create sharing opportunity to get those who part on the outlets out.

free power at the airport

Why is everyone on there devices in the airport? What could be so important?

When I am in the airport, I take time to decompress. Traveling for work is exhausting, so I relax (I also think, or ponder, the result is usually entries for this site).

I look around, I see everyone on their devices. I am not too important, not at all really, but I do web work. I support production live sites. My work has timelines and there is always more to do. It would make sense that I capitalized on downtime to do more work right? So I understand if people are getting a jump on work while they are in the air. However, I see a lot of facebook-ing and news reading verses writing documents, diagrams, and coding. I don't see a lot of people making the web a better place.

Recently the CLE airport added free wireless, and I think this is likely trending in other airports, which is enabling more people to get online as well. If they charge for power, at least the WIFI usage would be limited to those who properly charged their devices, or have their own data access. If not charge a fee, requiring a credit card swipe would reduce the crowding on outlets, and limits could be imposed on usage.

And why doesn't anyone care about security? You're traffic is likely getting monitored.

Misuse of computing 

Given the points above, when I see some kid or some rich old retired guy with a high end device wasting away on facebook leaving their machine mostly idle, it bothers me. I know of several software developers that would love such a device but are stuck with something less optimal. The use the the computing is wasteful. The sale of such devices should involve a screening process of how you plan to use it, and then the usage should be monitored in order for you to keep using it.

Wireless is available on the plane? 

The plane I flew on offered wireless internet... and I can't turn on my "electronic devices" during take off and landing? Seems odd.

Even more odd, when I cracked open my machine on the plane to read a PDF paper I had been putting off, I noticed that my Google Maps directions were still "mostly" functional in the browser page left open. The map tiles had some zoom capabilities, and the browser back button toggled previous direction routes correctly and re-drew the pages. I was impressed.

I was not impressed when I went to try and do some Google App Engine development and I realized the jQuery include for the script points to the Google CDN. I didn't have a local copy, and therefore I got to see how stupid my page is without Javascript.

More to come...

I am still traveling, I am going to post more, this was just the flight out.

Tuesday, July 26, 2011

itworksonmylocal.com is now this site

So I bought a domain for this blog. The site was previously "a word on", now it's "it works on my local".

Some background (if you care)...

"A word on" was chosen simply as a vague and open ended way for me to write up content on whichever topic I thought I might choose. In reality, the only thing I care to write about is computing and the interactions I experience while... computing or making machines compute.

Also, the domain for awordon.com is taken by some bullshit one page site (yeah your site sucks, publish some thoughtful content or take down your page). I don't care to try and buy some domain with tricky lettering and naming, so what else? My last name? That's not very cool nor thoughtful. Again, what else?

I don't know why but "it works on my local" popped into my head so I checked if it was bought and it was available. I went for it. I've heard this phrase uttered so many time during software build. The changes always work locally and fail somewhere else for someone else to test. From demos to major site features it always happens. I liked it a lot for my site, and there it is.

Don't worry about updating bookmarks or feeds, Blogger will redirect you. Hope this isn't too confusing, I don't get much traffic anyways. I also don't think the name of my site was noteworthy or relative in remembrance of the content within the posts. I also assumed one day that Blogger will be renaming its domain name due to the Google plus direction, and I would have been a victim of that change, so now the matter is my own verses what Google chooses.

Thanks for reading.

Monday, July 18, 2011

I just blocked my niece in Google Talk

My niece is young. She just drew this not too long ago:

x's and o's

She now has an email and added me in her chat list in Google Talk. I blocked her.

I blocked her because she talks to me during the day while I work and asks me when I am coming to play. I can only respond to this so many times. I tell her to go outside, throw a ball, or draw something. I think she watches TV instead. Hopefully soon, she will have some friends she can interact with online and leave her boring uncle alone.

Soon she'll have a cell phone, and then she will text me, I can't block that.

Then I got to thinking more...

Initially I thought, "she is too young for this". But she isn't. I was 10 when I was online. It's a 20 year difference between her an I, so basically in comparison, she is late to the game. When I was 13 I was hacking AOL, writing web sites and writing software. 9th grade I was taking programming class in high school. My senior year, I was in computer science AP. But that is just age.

Isn't the web dangerous for children? Yes, but it's as good as it's bad, otherwise, it would be illegal. Is it more dangerous the younger you are? There is nothing that is going to stop someone from finding what they want to find on the web. The content was there years ago, now it's just faster to get and more abundant (both good and bad). It's also easier to contribute content now.

Do you think the web is safer for your college son or daughter posting party pictures and video, or your pre-teen who is simply discovering what's going on?

Parental control? I didn't have them. I also didn't wear a bike helmet, I watched rated R movies and ate junk. Do I think these controls help? I don't know, I am not a parent (I am an uncle).

Parental controls are simply prone to breaking through the control. You're child will likely get pretty smart about getting around digital controls the same way they get around physical ones (might make for a good software developer upbringing actually). Forced to wear a bike helmet? You ride far enough down the street until your parent's can't see, and you lose it. Blocked from visiting your favorite porn site? Go to your friends house. Same deal.

I think if I had kids and I applied controls to their devices, I would try to break it myself. I tried to applied controls for my wife's aunt and her kids awhile back. I didn't even know how to do it. I don't think I care to do so. It's the web. I wouldn't be who I am right now without it. How can I justify restricting someone else from it?

So where does that leave me and my niece? I need to teach her the way of the force. I'll unblock her now.

Your file / stdout writing Python program works on the Google App Engine

Have you ever written a Python program that writes to a file or standard out (command line) and wished you could put it on the Google App Engine without having to rewrite it? You can. Assuming your code is well organized and the proper parts are decoupled, the file writing can be faked and presented to the user in a few ways.

I've done this twice now, but I will only talk about a pure command line implementation that generates file output or writes to standard output (the other was a "web app" with a "command line" interface as well). The csvdatamix project home page discusses the overall purpose and usage of the implementation example I will use, you can head there if you want to read more about it. In general, the goal is to read data, mix or map it, and then output to a stream. This application has been on the app engine for some time now, you can see it here.

How do you do it? Use the response.out as your stream. The response.out is a StringIO object and supports write and close functions in Python, so passing it as your stream works as if it were a file or standard out.

Looking at the base implementation (command line) of the csvdatamix application, we will see the use of the file:

_mixer = CSVDataMix(hasheadings=_options.head,
   sep=_options.delimit,
   quiet=_options.quiet,
   outfile=_outputfile,
   its=_options.iterations)

I've bolded the "output file. This reference is created as:

#command line
_outputfile = sys.stdout

Or

# file writing
_outputfile = open(_options.outputfile, "wb")

The same way the sys.out is passed, the response.out can be passed in your app engine implementation:

def execGAEMix(self,sep,hasheadings,its,infile,outfile):
   _mixer = CSVDataMix(sep=sep,outfile=outfile,
      its=its,hasheadings=hasheadings)
...
mainObj.execGAEMix(_delim,_hasheadings,_iterations,
   _thefile.file,self.response.out)

Now how can this be returned to the user for consumption? In the case above, with no changes, the raw content of your application will be output to the browser. This might or might not be desired. If so, the user can simple download the page and take the data output.

Also in the app engine, you send can email. In this fashion, the data can be an attachement to the user and you can return them a proper view verses raw data.

In order to use the response.out as an attachement you need to pull it's content after the "file writing" has occurred. At this point you can clear the response.out, and then, as said, give the user a proper response.

Here is how to manipulate the response.out (see clear method):

# get and clear the response.out
_literal_string_out = self.response.out.getvalue()
self.response.clear()
...
# now write your template to the response
_path = os.path.join(os.path.dirname(__file__),
   'template_MainPage.html')
self.response.out.write(template.render(_path, _template_values))

That mostly it.

Monday, July 11, 2011

Conversation highlights with a fellow computer scientist

My buddy is in town from California and we spent some time out last night. It's always a good time when he visits because it's an absolute nerd chat for hours. We are both computer science graduates from Kent State. Afterwards, he went on to bigger things, doing his masters at Carnegie Mellon in HCI, going to work for VMWare, and now Google. All while I remain local to Cleveland.

We chatted for awhile last night and it's always interesting to hear his point of view from Silicon Valley against mine here in Cleveland. He is also a designer, where I mostly write code. He's worked on products, I've been in consulting and at a bank. These are some highlights of our conversation:

Engineers

I guess in Silicon valley, developers are engineers. My buddy kept saying "engineers" and I didn't understand. I remember hearing that the engineer title is somewhat formal, meaning you've achieved the title through specific training or certification. My buddy was surprised and asked how I refer to myself. I said I "make shit work". Some links about being an "engineer":
What's up with the hair?

"What's up with the hair? You kind of look like an engineer.", he says. Yeah my hair is a bit out of control, but it's not so I can look like a crazy developer. But if that's what people assume, even better for me I guess. The stranger you look, the better code you write I:
Google UI Changes

My buddy is on his way to Google from VMWare and will be doing interaction / design work. I asked him how he felt about the recent Google changes, he turned it back on me saying, "you are the user, how do you feel about it?". Here is what I said:
  • I haven't used it too much, so I don't want to hate on it too bad but...
  • Everything is very soft 
  • Page elements are not pronounced meaning I have trouble seeing where something starts and stops
  • The search box takes up too much of the page, there is too much space around the element, everything else is pushed down and right
  • Page elements like the search take up too much page space
Consulting verses product work

We chatted a bit about me doing consulting work and why I do it and why I like it. As we spoke, I realized my perspective was very different than his, basically given the types of work we do. I explained that I couldn't see myself doing internal company work, I like the web and the front lines. I also explained that in many cases, the talent I see at the companies I consult for is less impressive and I wouldn't want to work in an environment where talent and innovation is sparse. He made me realize that the very reason I am consulting for a company is why I wouldn't want to work in such a place, and not to let that skew my outlook on doing internal company work.

We also talked about work break down. The last few years of my like in consulting has been all about tickets, tickets and tickets. Unless I have a prioritized ticket, with proper details and schedule, I don't work on anything. Even exploratory, innovation and design need tickets. When I log time, I do it per ticket, per project. He's never had to do this.

How's the Cleveland market? 

Having left Cleveland, my buddy wanted to hear, and usually asks, how things look in Cleveland for technology people. In Silicon valley, it's easy, there are jobs everywhere, big companies to start ups are hiring. He always said he can walk across the street and find a new job if needed.

It's not so simple in Cleveland as walking across the street, but I think there is plenty of work here and everywhere. People and companies are always going to need work done. So I think its good for consulting, or service oriented jobs. For a HCI / designer / usability guy who purely wants to do that work, I think it is very difficult here in Cleveland (although I have no data). I would guess there are maybe 5 total places that might take this role as serious as Silicon Valley companies. It's globally understood as vitally important to any technical deliverable, but more excusable when budget it tight.

He knows this I think, but always likes to ask because he likely will never move back to Cleveland, and likes to hear how I maintain.

What's next?

My buddy is going to Google, I recently changed jobs, what's next we both asked each other? We both talked about having our own companies, or keep working for something smaller. Getting involved in something from the beginner, etc.

For me, like I said about the Cleveland market, people need work done. Any company I would start on my own would be a simple services company with some specialization if needed. Unless I have some blow out idea or can think of how to compete in a hot space, then I might change my approach.

Thursday, July 7, 2011

Being in the hospital and technology

I went to visit my grandpa in the hospital recently, he had news papers, was watching TV and had a puzzle book (pencil and paper). On TV he was watching some western movie on AMC.

My other grandpa would sit with the TV off and look out the window in silence. I'd ask him what he was thinking about, he would talk about his lawn.

Another recent visit to the hospital was with the younger generation. They had access to phones, the hospitals have wireless. Access to anything really, work, games, news, social sites, etc. We have e-readers now for books and magazines.

What a difference in mentality. How many people can turn off for a few days of medical care? Would you be fine with just TV and a physical news paper, or physical book? What about some silence and a window? I might go insane.

Simple observation the got me thinking how it will be when I am 80 something, and my grand kids wonder how I do what I am doing without going insane myself.

Saturday, July 2, 2011

Is caching your crutch? Fix your code first then cache.

I read a lot about performance, specifically on the web. There is a lot of hype right now about page speed and appearance of speed to the user of a site. A lot of these discussions talk about caching strategies. While I feel caching is a vital layer in web performance, I feel more and more it's used as an excuse not to fix bad performing base code.

"Site is slow, oh we need to cache more". No, you your code sucks and it can't stand on its own with load, it also doesn't degrade gracefully.

There are so many layers of cache. You can have internal application caching, simple in memory data structures. There are also object caches like memcache. There are content delivery networks like Akamai. You also have browser storage (http cache, cookies, local storage, etc). Then there are warming processes, prefetching, background loading.

Being good at these all is hard, plus writing your code correctly and being performant is hard. I think writing better code is the first fix for performance gains. I've seen so much time spent on the cache aspects in order to cover up bad code. If the base problem is simply fixed, then you wouldn't need that much cache anyway.

There are some simple first steps to be performant before you move to caching to keep your site up.

Seriously, look at your loops. You might be looping over file records to construct a data structure, and then you have to loop the data structure. This makes sense in object oriented programming for organization, but not in performance. Do the logic on the data as it's read.

Define your variables for when they are used and then clean then up when done. Sometimes container objects are constructed and hold data that is never accessed. Lazy load this information. When your container constructs, you don't need to initialize or execute logic that isn't used in a given execution path. Have a deconstructions strategy. Delete references, close connections, clean up. Look at your code's memory usage.

Remove resources from your test environment. Test your code on minimal hardware. Reduce memory, reduce CPU, make disk I/O slow. In these conditions, how does your code perform? Badly? If you can get it to run fast on less, it's going to run better on more. You'll start looking at general consumption of your code like you weren't before. You'll want to run performance tests on this environment to know where the site falls down. I hate hearing, "this is my test environment, so the site might be slow".

Have you thought about threads yet? Break up your logic, distribute it. How about asynchronous logic? How about queues? All of these add the factor to delay until later when there is too much going on.

When there is too much going on, does your site degrade? Can you turn off sections at a time, verses putting up a complete outage page? If not, your users are likely getting upset. Add this.

What is your site download size? Getting over the wire without cache is huge. How large are your pages, scripts, images, styling, media, etc? Can it be compressed?

Now tune your platform software. Tune your web server, tune your app server, tune your database. Tune your OS. These likely have performance boosting settings built right in that can be adjusted for your software.

Now you can start thinking cache once all this is done (if you even need it). If you did caching first on-top of your code that doesn't know what it's doing anyways, then it's a crutch. As soon as it's removed from the equation, you code will fall over.

See also:


Share on Twitter