AJAXify your Wordpress

Learn how I ajaxified my wordpress blog with these few steps...

SBS Show!

Listen to the latest episode of the SBS Show, Dave Sobel talks about process management...

Vladville Newsletter!

Looking for a more focused, exclusive insight into the world of SMB tech & business? Sign up for my newsletter!

Archive for the 'Programming' Category


MSN/Live Messenger Protocol Gotchas
Posted: 3:56 am
June 16th, 2007
Programming, Shockey Monkey

It’s almost 4 AM and I’m sitting around coding in MSN/Live/com IM integration for Shockey Monkey. The basic premise is that the system will IM me when there is a new ticket waiting or when a user had updated/escalated their request. I finished coding this thing about a week ago and it works fairly well for what it is (a dumb sql->messenger gateway) but tonight I sat down to get rid of some annoyances. Here is what I found out.

For the most part, MSNP 9 is the most thoroughly documented implementation out there.

MSNP 9 is also very outdated, and MSN is trying very hard to move/force you up (I think they are on 13 now).

There is a gotcha in the signup process. For example, if you sign up for a live.com/msn.com passport id and initiate the first connection via MSNP 9, you will be prohibited from logging into it with that protocol – forever. However, if your first session is initiated via live.com messenger client (MSN P 10+) you can use any of the higher and lower edition clients.

Also, MSN does not tollerate bots on their network. The proper way to integrate your bot in the MSN network is to do your development/etc via IM Provisioning Center.

Read the whole post...

Deported to India
Posted: 12:04 am
May 21st, 2007
Programming

We have a little saying around the office, “If that patch isn’t committed to the cvs by noon we’re deporting you to India.

Tonight I decided to get cute and implement some visual effects. I’m ashamed that the stuff below took 25 minutes to produce:

$style = ( $i % 2 ? ‘altrow’ : ‘row’); $i++;
echo “<tr class=\”$style\”
onClick=\”window.location.href=’
/view.asp?item=ticket&ticketid=$tickets[ticketid]‘\”
onMouseOver=\”this.className=’hrow’;\”
onMouseOut=\”this.className=’$style’;\”>”;

I’ve posted it in its entirety so I can be ridiculed at a later date. What took so long? Stupidity as usual, but the longer you go in a stupid direction the longer it takes to figure out just what went wrong in the first place.

The top line just determines which style gets applied to the row in a listing. The idea is to alternate styles so that the table is easier to read. There are two styles here, row and altrow – pretty simple. As I list data I’m using the modulus (remainder after /2) to determine which style gets applied. There are two events that fire – namely when the mouse hovers over the row and when it leaves it. When it hovers, the style ought to be switched to hrow which is my highlighted row. After it leaves, reset the style back to what it was previously.

Then I decided to get cute. I wanted the row color to change as I scrolled up and down the list. I also wanted to be able to click on any inactive space in the row and still take the default action. Again, programming 101. Where I lost the ball game was on the this.style part – this.style takes on all sorts of things like color for example – all except stylesheet name. It took me good 20 minutes to figure out why/where/how before I finally went back to look it up. I suck.

Read the whole post...

Live from Las Colinas!
Posted: 4:08 pm
June 7th, 2006
Programming

Several thousand Microsoft.com visitors come to Vladville every day. Perhaps one of you is doing Internet Explorer development and have to suffer through the debugging, I don’t know, but if any of you work in PSS and are… let’s say ready to sell your stock.. I got $100 for you if you make this your last act before you leave  

Morepss

I don’t know how I’d make it through the day without Dilbert. Some people have coffee, some have Mountain Dew, some have pr0n, some have warez, a side job selling junk on eBay.. whatever it takes to get you motivated and working. For me, thats Dilbert. The sad part is that not a day goes by that I don’t get a live reenactment of a previous strip. It alone gives me enough sense of humor not to kill half of the people I work with.

P.S. Offer not available to the SBS team which has already promised to do much worse.

Read the whole post...

Underestimating Human Complexity
Posted: 9:06 am
May 23rd, 2006
Programming, Shockey Monkey

For the past month I have been embarking on a task of replacing myself with a shell script. This isn't as complicated as it seems, turns out I'm very predictable in terms of how I manage the business. The problem is that in the world where there are only 24 hours but I need to work 30 hours there is a need to hand off certain responsibilties to another monkey and hopefully with minimal training be able to delegate some of the responsibility without affecting the result (network up).

So about a month ago I set out to code the NOC management system for Own Web Now and man, did I underestimate just how much stuff happens transparently without really thinking or documenting it. For example, last night I spent nearly two hours writing the function to calculate ticket age. The function itself took about 10 minutes, the debug/test/what if took just shy of two hours. Why? Well, time zones. Leap years. SLA plans.

Here is the context. No client should be knocked out for more than 0.1% of the day –  If the monitoring system notices a downed state it opens a ticket. So far so good. Now, the system calculates the time between the initial outage and service restore and if that period is less than 0.1% we're delivering on our SLA. Now let's say the system goes down at 11:58 PM but comes back at 12:04 AM. How is the outage logged? Uhh, it was just down Bob! But, the panel that shows the client flawless performance throughout the week will now have two orange fields instead of just one red one if we dropped the ball.

That makes me look bad even though they were only down for 6 minutes – maybe they were not even down, maybe it was just timing out on my monitor because we only do ping checks for this client. Hrm. Ok. Now, let me widen the range. If the time crosses two calendar days but we meet the SLA on the total outage I only count that as one down, not two separate incidents (as it appears in the overview panel). Ok, now calculate which day had a longer outage and stick the report into that calendar day. Woo! Oh, the field of when the outage happened? Ok, 11:58 PM. But wait, the other function calculates the time by subtracting the resolution time from the open time. Outage interval: -23:54? Ok, throw in another consistancy check.

So as a monkey I really only had the server out for 6 minutes in my head. On a logical evaluation and reporting mechanism I have 200ish lines of code to explain that to the computer. So who is smarter, the monkey or the computer? And people wonder why I keep on calling myself and my staff the monkey force. There was literally a moment last night / this morning where I felt like the gorilla at the opening of 2001 Space Odyssey, thank god there were no bones around me or that monolith would have been beaten.  :)

But here is some value-add for you to thank you for reading all this text: Here is a blog post off digg.com where someone made cheatsheets for web development. Now I've never been accused of being a great developer so this is a total life saver for me. I honeslty do not spend enough time in JavaScript to justify learning all the parameters that XMLHttpRequest object takes. Digg it!

Read the whole post...

In the mood for free toys?
Posted: 2:21 pm
April 12th, 2006
Programming

Microsoft.com again offers two e-books on Visual Basic as free downloads. The two titles are Introducing Visual Basic 2005 for Developers and Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET. I know, I know, this seems irrelevant but you should check it out. You see, back in VB6 days nearly everyone could be a coder because it was such a simple thing to nearly master – if it was possible, it was possible in a matter of minutes. With .NET and .NET 2.0 things are just as easy and a lot more powerful – but the intrface has changed quite a bit. So get it and catch up on the first few chapters. As for this weekend, there are a few things that have kind of caught my eye. First one is the ifolder server which appears very interesting. Not a server monster? Well, there is some stuff over at multiply.com that appears interesting but not quite useful. Either way, more fun stuff to play with.

Read the whole post...

Downloads to check out this Weekend
Posted: 2:20 pm
April 6th, 2006
Programming, System Admin

Here are few downloads that caught my eye and are sure to fill up a boring weekend assuming I get more than an hour off to play around. Enjoy. Windows RSS Screen Saver Sample in C# Creating Windows Mobile 5 Line of Business Applications (code & webcasts) Microsoft Exchange 2003 SP2 Standalone Help File

Read the whole post...

Developer worlds collide: Atlas & CentOS
Posted: 10:14 pm
March 21st, 2006
Microsoft, Programming, System Admin

While the two are not similar in any perceptive way I feel these announcements mark a day on which two closet technologies really matured. First Microsoft releases Atlas, an IDE for AJAX web based applications and CentOS releases a stable Enterprise Linux distribution backed by the community. First on CentOS While not the first or the new Enterprise Linux project by any means, CentOS made a major step today with finalized 4.3 release. You see, for years there was no such thing as a stable Linux distribution. It was always in flux living on the whim of individual package maintainers. Many opted to put together their own by compiling the OS and tools from the ground up with Gentoo or trusting Debian's stable yet technologically obsolete distribution. Then RedHat sunk in a lot of money into a commercial distribution of Linux that is backed by a vendor with standards and support for at least five years. Then Whitebox Enterprise Linux and CentOS started a community initiative of recompiling Redhat Enterprise Linux and offering it for free. Today marks a day on which the CentOS distribution is not just stable and reliable as it has been for quite some time, but also widely supported by plenty of mirrors and multiple architectures. Community is the key here, it eliminates any political or legal restrictions on packages that are available. So if you are looking for a free and stable development platform… you don't have to look any further. Microsoft releases AJAX This was covered with a lot of excitement during PDC last year and has now launched over at Mix 06 where Microsoft is pledging its committment to web services. Good for them, really. Now look up. Story on Linux. Story on Windows. If a something like this was posted two years ago the person writing it would get skewered and burned by both camps. Truth of the matter is both audiences have matured by leaps and bounds. Microsoft no longer looks at Linux and other technologies as trash and is very accepting of the platforms their customers choose to develop applications on. If you've seen R2 you will have to agree that the Interop possibilities are just amazing. Likewise, I know a lot of people that will jump for joy for a streamlined interface for Ajax development. Until now you were almost forced into notepad, textpad and nano of the world to make javascript mods and test them in a browser. A mature tool to streamline development and testing will not just lead to more code, it will lead to better code because it is now easier to keep track of whats going on. This is why Microsoft is so respected by developers (a heck of a lot more than it is respected by us sysadmins) — they really make the job a lot easier with their tools and are very accepting of new ways of doing things. It's a good day, a very peaceful united day in the cyberspace. :)

Read the whole post...





 

Categories

 

Archives

 

About

Divider Divider