Archive for September, 2012

Google Chrome dev 23.0.1270.0 is Out

Wednesday, September 19th, 2012

Google Chrome

This morning I noticed that Google Chrome dev 23.0.1270.0 was out, and there's a nice set of changes for this release. There's the V8 javascript engine - 3.13.7.1, and then there's quite a bit of codec/playback work done as well. I don't typically do a lot of that, but I can see that others do, so it's a good thing to get nailed down.

The speed is nice, the redrawing is superb… very nice tool.

Nothing Like Riding the Beast at Night – At Work

Tuesday, September 18th, 2012

Code Clean Up

I love King's Island's roller coasters, and The Beast is the best. If you ride it at night - right before the park closes it's chilling and thrilling, and no matter how many times I ride it, it's always a new thrill for me. Today was kinda like that - but at work.

So we had 'Launch Day' on Monday, and so as you might expect, there were a bunch of "little things" from the users that needed to be attended to. Certainly understandable, and I've done this enough to know that this is just the way things are… still, like riding The Beast, it's something that certainly gets your heart racing.

First and foremost - it's about time. You have a day to get as many of the "bad" problems fixed, tested and into production as possible. This is because the first impression you gave the users today is going to be supported by the changes you can give them tomorrow. Speed of fixes is crucial in the first days of a project.

Then it's about quality. You can't introduce problems with the fixes, so you have to be careful. This is most often where I have seen a lot of folks stumble. They fix one thing and then break another, and the result is that the users think the development staff is asleep at the wheel. Not good.

So today has been a lot of very fast, very careful work highlighted by the fact that we're really doing the vast majority of the work do deal with crummy sources and sinks of data. I was thinking about this a few days ago, and wondering why this seemingly simple project had so many developers on it and was taking so much time. True, we're ahead of schedule, but that just reinforces my concern.

In Finance, this would have been a few weeks of one or two people - tops. Here's it's much more than that. Why? Well… I came to the realization that about 90% of the code we've written is about dealing with bad sources and sinks of the data. I know the purported benefits of SOA… it's supposed to be great. But that's only true for little things. There's a reason that databases are useful and valuable.

We read a lot of merchant data from an unreliable source. If this were in a database in the data center, then this would be trivial. Likewise for reading the demand data. Updating data would be super easy as we'd have some stored procedure or something to update it.

Yet due to SOA, all this is taking tons of time, and then there's the SSL layer on top due to the fact that a database offers security, but a web service doesn't. It's a mess. But I understand why they are doing it - it's "the way". Still doesn't make it efficient.

I'd love to trade in the sources and sinks for a few databases. The code would be 100x faster, far more reliable, and far less complicated. When I write stuff, I'm not going to let the Kool-Aid get in the way of making a good system.

Launch Day!

Monday, September 17th, 2012

WebDevel.jpg

Well, I didn't realize what today was, so I was a little surprised to see that today was Launch Day for the project I've been working on at The Shop. It's nothing that I'm worried about, but it's been a very busy day considering what's going on.

The day started out with problems in the production runs, but I was in early enough to make sure that things worked out, and then we're off to the races. There were a lot of things still to do, and today I started a few of them and passed off a few to some of the guys in the group.

First, we need to look at the performance. It's horrible. I mean really bad. It's taking an hour to run a division on the production "box" at EC2. Compare that to running it on my MacBook Pro at about 5 min. and the problem is evident. We need to fix the I/O issues. Maybe it's all in the resources of the EC2 machine, but maybe we have what we have and need to change the code around to make it more efficient.

Right now, we need to up the resources, which I did, and let the runs go again and see what the performance differences are. I'm hoping to see significant improvements, but I'm guessing we won't see real improvements until we get the dedicated hardware at the SNC1 datacenter when that arrives. Still… cutting down the hour to 30 mins or so would really be nice.

Second, we need to have a lot better handle on the performance metrics. We have NewRelic wired in, but not nearly enough. We need to make it a lot more interwoven. So we took the time today and added a lot more instrumentation in the code so that come tomorrow we will be able to see a lot more of the breakdown of where the time is being spent.

Third, we needed to fix a bit in the code regarding merchants with closed deals that haven't run yet. In the existing code, these were considered merchants that should be contacted again, but in reality they shouldn't. So I needed to modify the Salesforce endpoint, and then put that to Staging and write the code to pick it up and do the math that was needed. It's not hard, but considering that we're live, it's something that needs to be done today.

So I spent a bit of time this afternoon getting the Salesforce changes in, checked into git and tested and going in UAT. Then I felt with the Salesforce guys to get it pushed to production. I needed it there in order to make sure it was going to run well tonight at midnight. I'm glad to see that it all got done.

Finally, there were a ton of little issues from the initial user feedback. Nothing major, but lots of little things that needed to be cleaned up before tomorrow. It's been a heck of a day!

Hopefully, it's going to work well tonight. But I'll be sure to be in good and early (like usual) to make sure that things are ready for the day.

Working Feverishly to Build a New View

Friday, September 14th, 2012

WebDevel.jpg

Today I've been trying very hard to get a new view done before I have to leave early to catch a bus, to catch a train to get home in time to go to the Car Dealership to pick up the car we got for Marie to drive. It's a 1989 Volvo 740GL with 198,000 miles on it. That's a lot of miles, but I know she could not be happier with the car.

In any case, I needed to get this visualization done, and it meant that I needed to add a new view to the CouchDB as well as making it another drop-down on the page to allow the user to pick the sales rep to view. The basics of this page is to show the user the Top 100 merchants assigned to each sales rep in the division, ordered by the merchant's sales value.

It's not really all that hard, but in keeping with the style I've change to with these pages, it's a lot of little calls, as opposed to a few big calls and then manipulating the data once it's on the client. It's a different style, that's to be sure, but it's workable and I just needed to get the queries done, and the calls set up so that things looked reasonable.

Thankfully, I was able to just get things done before I had to leave.

Whew!

The Death of Imperative Programming

Thursday, September 13th, 2012

I got a note from my manager, a link to this article and the words:

Found something that might stir you up

and sure enough, it did.

I can certainly understand that the rise of the functional languages is going to effect the traditional uses of imperative languages. Certainly for a lot of the uses - I'll even say the majority of cases, performance isn't an issue, and functional languages have the benefit of immutability and therefore a lot less error-prone. While developing in a functional language is vastly difference than an imperative one, there are still reasons to learn the functional approach, and make use of immutable data types - even in imperative languages.

But to think that imperative languages are going to die?

Yeah… No. Not gonna happen anytime soon.

Functional languages - even the most mature ones suffer from the garbage collection problem. If you're going to be creating immutable objects and doing anything with them, you're going to be creating new ones all the time. Kinda goes without saying. And this is where they all suffer.

Java is great, save the GC pauses. Erlang too, with it's smaller GC pauses, but they are still there.

For the rest of my life, to be sure, there are going to be a need for developers that are capable of doing the "hard stuff" - regardless of how many improvements the functional languages make.

Performance is going to matter.

Interesting Sublime Text 2 Package – MavensMate

Thursday, September 13th, 2012

Sublime Text 2

This morning I got a note about a Sublime Text 2 plugin for working with Salesforce.com APEX code as well as Git integration - MavensMate-SublimeText. This is a pretty amazing project for working with Salesforce.com code. While I haven't installed it on my laptop, it looks to be the thing if you're doing any significant amount of Salesforce.com coding. There are pages for running tests as well as immediate mode execution, and then of course, the highlighting and 'Code Assist'.

Very interesting. If I get into some real Salesforce.com code, I'll have to look harder at this.

Code Should be Simple – Not Hidden

Wednesday, September 12th, 2012

GeneralDev.jpg

I was talking to a couple of guys in The Group today and I heard a few guys talk about extracting the logging and timing metrics from the code itself, and have them be simply meta-programmed into Ruby such that all methods of a certain class would be logged and timed. Now I'm all for simplifications - to a point, but this is really, in my mind, going way too far. There's something about minimalism that I think is attractive to the Math types in a group, and we have them, but that's not at all realistic, as code needs to function in the real world, which means that it has to check inputs, log lots of intermediate state, and in general do all those things that rookie coders don't do and it gets them into trouble when their code doesn't perform well in production.

Simple is one thing. Hidden is another.

Don't hide the complexity of logging. It's in your face, and it's meant to be. There's no way some meta-programmed log system is going to know where I want to put every one of the log messages I want. Timings is a little easier, but it's still a mistaken assumption that simply timing method calls is sufficient as I'll never need to sub-divide a method call.

Fiddlesticks.

You need to have logging and timings sprinkled in your code. It's not homework coding, but I'm coming to believe that there's a lot to be said for the C++/Java world that I come from. Ye,s it's not Ruby, and there are a lot of things to like in Ruby, but there's a lot that I think these guys take for granted and don't properly write code to guard against.

Make code simple, yes. But if you hide too much, then you'll forget what's really being done, and you're going to get hit in the rear pretty soon. Performance is a huge blind spot for the majority of these guys. They just don't see it, and don't see it as needed. Couldn't be more wrong. It's always important in a production system.

So I'm going to try and guide them away from this decision, as I am a firm believer that it's going to get them, and me, into hot water. We just don't need it.

Ruby include vs. extend

Wednesday, September 12th, 2012

Ruby

I learned a valuable lesson about Ruby this morning - if you have a module of shared code in Ruby:

  module SharedStuff
    def log
      puts "log"
    end
  end

then:

  • include makes the module's methods available to an instance of the class
  • extend makes the methods available to the class itself

This means that by using the same base code, you can add them in as class methods with the extend directive, and as instance methods with the include directive.

Totally 'Ruby', as it's a strange, massive difference that might be missed by new users of the language.

Glad I Learned it.

Skitch Takes Another Bullet – Nearly Dead?

Tuesday, September 11th, 2012

Skitch.jpg

I loved Skitch when it came out. I paid for it (twice), I paid for the "Skitch Plus" service - all because I wanted to support the guys making great software for the Mac, and I didn't want them to get bought up and thrown away. This was all before it was even out of beta! And for a while, things were good. But no good deed goes unpunished…

I knew a while back that Evernote bought Skitch and I had a bad feeling about it. Skitch was perfect as it was - small, targeted, and perfectly worked UI for the task at hand. Now it was going to be some uber-thing part of this Evernote suite of products. I had a very bad feeling.

Still, for a while, things didn't change.

Then yesterday I saw this tweet:

Twitter _ danielpunkass_ Skitch was my favorite Mac ...-1

and my heart sank. I had to read this blog post to get the real effect of the change.

Skitch is getting even better. Soon sharing in Skitch will go through Evernote so that you will be able to take advantage of Evernote's syncing, searching and sharing features. To do this, we are making a few very important changes.

Yeah, you're trashing it!

So I downloaded the Evernote app… made an account, and started the transition. What I found was that the concept behind Evernote is noble. The implementation is just plain nasty. As in crooked nasty. Selling stuff about me, nasty.

I want to pay for something simple. Something clean. I want to support the developers that make great products, but it's clear that far far too many of the devs for the Mac are really looking for the IPO Cha-Ching!, or the Facebook Buyout. They really aren't into sustainable development and pricing. So they do this.

I will admit that they cleaned up the web page a bit:

Twitter___danielpunkass__Skitch_was_my_favorite_Mac_...-20120911-080054.jpg

but they removed all the good URL links. Why?!

My feeling was they didn't want people hitting their servers for the images like Skitch used to allow. I'm not sure that this is the case, but it sure seems like it. For the time being, I'm going to have to live with this as I have at least found a work-around.

But I'll be writing to Evernote and asking for them to be re-instated. Also, can't they use some better URLs for the images? The image above has a URL that's about 250 chars! Gee whiz!

I'm going to have to start looking around for something else. Maybe I need to look at WebDAV and use Skitch as well, but then I'm a little high-and-dry if I loose something. Not really likely, but it's something to think about.

I really hate this kind of change… it's all about the money - not at all about the supporting users.

UPDATE: I tried very hard to post the images form Evernote to this post, and in every case, it failed miserably. I think the Evernote server is again doing this out of spite for the blogs, as the old Skitch site works well. I'm going to have to look at setting up a WebDAV server on HostMonster just for my Skitch usage. Crud.

UPDATE: I spent more than an hour trying to get WebDAV and SFTP working. I was able to get the server-side config working as Panic's Transmit was fantastic. But it's Skitch. Crud. So I sent off a note to Evernote/Skitch support. I sure hope I get a decent answer soon.

[9/12 4:50am] UPDATE: got this back from Evernote support:

Thank you for contacting us.

At this time, Evernote does not provide a direct link to an image for use in hot linking to other websites as it does not provide web image hosting capabilities like other services. You are able to share the URL of the image as it is stored on Evernote for viewing, which will bring viewers to the Evernote site.

We apologize for this inconvenience,

Jerks. They are purposefully shutting down the Skitch.com site and leaving on this non-functional replacement. Great.

[9/12 7:19am] UPDATE! Success! What I can do is to make a generic, insecure, FTP account and then put that into Skitch, and it will then properly use it. Yes, I'm not happy about FTP versus say, SFTP, but there's not a lot I can do about that. It appears that the code used in Skitch doesn't match up the SSL keys properly, as the log indicates. This means that all I can do is FTP, but at least then all the images are on HostMonster, and that's perfect!

Google Chrome dev 23.0.1262.0 is Out

Tuesday, September 11th, 2012

This morning I noticed that again, Google Chrome dev is bumped to 23.0.1262.0 with some more good release notes. There's an update to WebKit (537.10), and the V8 javascript engine (3.13.6.0), and at least one Mac-specific fix. Nice! The page refresh speed is really quite amazing, and has been for the last two releases. It's really impressive. I'm hoping they keep it up!