Posts Tagged Karl

Posted on Programming

Some stuff is fun

Karl will remember this one.

I don’t know how it started, though I suspect it was with Luke. Maybe he asked a question, or requested assistance from Karl or from me. However it began, it ended with the the three of us solving our way through the OSIX challenges. It actually worked out very well because at least one of us was well-suited for each level.

Level 12, the second last, was my favourite. It was called the Evil Professor, and if I recall it with any accuracy, we were provided with the specs for an instruction set and a binary file that, when executed on the fictional machine built for that instruction set, would print for you the key to complete the challenge.
(more…)

Posted on Programming

Oh hey, want to be friends?

I want to one day go up to someone and say that, just to see how they react. Also because I have no friends. Seriously, I only ever play Left 4 Dead in person these days. My xbox live friends are so busy hugging zombies and watching videos that they no longer want to cooperatively kill them with me. Oh, well – at least they included the split screen mode.

Guys, a few days ago Sheldon basically called me a liar. Why? Because he’s insensitive. To satisfy him, here’s a picture:
(more…)

Posted on Uncategorised

Adobe and Flash

Hello, World.  I’m Karl.  Brad gave me an account on his blog, so I decided to use it, to “rant” about Adobe.

Half a decade or so ago, Adobe decided that they would look much more hip if Macromedia happened to be hanging from their belt.   Suddenly, Macromedia disappeared, and Flash became Adobe Flash.  This was surprising and unexpected for people like me that do not pay attention to current events.

Soon I realised that Adobe was the best thing ever to happen to Flash.  Adobe looked at what people wanted for Flash, and they did almost every single thing people had been asking for years for.  They open-sourced nearly everything.  They added hardware acceleration, linux & 64-bit support, runtime generation of resources, local file access, and recently even 3D transforms.

Brad said something to me recently, however, that has gotten me thinking about Adobe.  He said he “read some funny / scary things about actionscript 3.”  At first the words meant little to me.  But as time passed, I began to think about Adobe, and my recent frustrations with them.

Over the past two days, I’ve spent significant time working on one of my large projects.  In that short time I encountered four or five bugs with Flash and Flex, two of which were entirely new to the bugbase.  Each bug crippled my ability to continue for hours, while I tried to isolate the problem and then somehow work around it.

I really have no desire to run into bugs in my tools this frequently.   It reminds me of something I’d forgotten about Adobe: Adobe created ColdFusion.  I had to use ColdFusion extensively while working for .NU Domain, and it gave me the same kinds of issues.  I tend to use features of a language to their fullest when I code, and when coding in proprietary languages made with regard for features over stability, this results in me running into issues relatively often.  It really gives an icky sense of the product being totally hacked together — and if I am making my product using this hacked-together product, how can I even trust my own creation?

ColdFusion has come a long way since I used it last.  By now, I imagine Adobe has put bandaids on all the bugs I found long ago.  Along the way, I imagine they introduced about twice as many features and about as many new bugs, all of which are probably much harder to run across than the older ones, and take much longer to isolate when you do.

Adobe provides two methods for reporting bugs with its products.  The “wish form” has been around for some time.  It gives a simple interface for submitting a bug report or a feature request confidentially.  Items submitted via the form are categorised by Adobe into an internal bug database.  One recieves no feedback after submitting a bug via the form.  However, I have submitted two bugs using this form, and both of them were quietly fixed by the next release.

The more grandiose interface is the triply named “Adobe Public Bug Database and Issue Reporting System”, “Adobe Bug Reporting System”, or “Adobe Bug and Issue Management System”, which I call simply the bugbase.  This public bug database contains a subset of the bugs in the internal database — most of the public bugs have been submitted by members of the community who have registered at the site.  A number have also been imported from some older (Macromedia?) bug and feature tracking systems.  The advantage of a public bugbase is being able to search for workarounds to existing bugs, to watch bugs and receive updates when they change, and to show your support for bugs you care about.

The public bugbase has a feature shared by many others — that of ‘voting‘ for issues.   A given bug is not shown to Adobe developers, and is left with a status of “Open” or “Community”, until it has passed some unknown vote threshold.  This feature makes it much easier for Adobe to totally ignore the problems that not many people encounter.  Unfortunately, there are a lot of those.

At the time of this writing, there are over three and a half thousand bugs in the bugbase marked “Open”, “New”, or “Community”.  Only 15 of these have ten or more votes, and 2833 of them have no votes at all.

I would encourage anyone who uses Adobe products and has encountered strange things occurring to visit the bugbase and give your issues a vote.  Especially if the issue gives you the impression that something important should really, really be refactored.

 

Posted on Programming

Codepaste – upload/download

As per Karl’s request, I added the ability to upload files to codepaste and to download code files from it. They were actually easy features to add (it only took about 50 minutes). Hopefully they’ll be useful.

More importantly, I got a chance to look at the code I’d written for it. It was actually pretty nice – I was surprised. I had completely forgotten about that theme/skin system it uses. It made it simple to add the additional html to the interface, and to style it for the two skins.

 

Posted on Uncategorised

mxml, google, and sockets

Trying MXML always seemed just a little scary; All those tags everywhere, while just writing the class files was so nice and familiar. I finally did it, though. Yes. Yes, I really did. Not only did I use MXML for the first time, but took that trend of trying new things and clambered up and out of the sandbox into the open air. Neither were as frightening as I had hoped. They were actually kind of cool. I’ve even used them since.

karl sent me to google app engine. It looked slightly amazing.

For work, I was using sockets in PHP. The code worked fine locally: it would connect to the RPC Server and retrieve the appropriate xml, parse it, and take whatever action applicable. Sadly that was far from the case when run on the actual web server.

It only ever retrieved partial data.

If I called read twice, it would sit there forever (or until it timed out) waiting for data.

If I sent a random character and read from the socket, it retrieved more of the data. Which was fine, as long as I was willing to guess at how much data each response would bring.

Again, not the case.

string socket_read  ( resource $socket  , int $length  [, int $type  ] )

PHP_BINARY_READ (Default) – use the system recv() function. Safe for reading binary data.
PHP_NORMAL_READ – reading stops at n or r.

I ended up switching to the other read (the one that ends on n or r) and calling it in an infinite loop (breaking when the line contained the close tag).
Thankfully, that seemed to work.

I have to give 14 days notice before I leave. Which works out well when they don’t tell me about rent increases until seven days past that.

 

Posted on Programming

Icon Files: interface(s)

Bradicon was mostly working. We’d pushed through the tedium and had made it all the way back to fun – designing the interface!

There were two main constraints (requirements, if you will) to Bradicon’s interface: a way to upload files, and a way to download the generated icons.

I decided that I wanted an upload progress bar, and that I wanted it all to work on a single page. SWFUpload was an easy answer to the upload progress bar. Having used it before, I knew I could write appropriate callback functions to do that. Plus, there was the added benefit of uploading more than one file at once.

Next came the actual design, which I did in Photoshop. I then cut it up and formatted it with HTML and CSS, which sounds boring but I actually find it really relaxing.

There were some issues with SWFUpload‘s loadUI() function not being called in IE on refresh, but Karl and I fixed that up.

var movie = document.getElementById(swfu.movieName);
if (movie != null && !document.getElementById(swfu.movieName+"BrowseBtn")) {
	if(movie.PercentLoaded() == 100) swfu.loadUI();
}

I didn’t want the page to have to refresh. My first thought was to go with an iframe, but that was ugly. I decided to pull the content from the iframe and put it into a div. But that didn’t work the way I wanted it to work – the code wasn’t as pretty as I would have liked. So, I did my first ever xmlhttprequest! 🙂 Now Bradicon is all ajaxed up.

I decided to make two versions of Bradicon’s interface: A simple version, and an advanced version. The simple version would just sport a regular HTML form, redirecting back to itself once the upload had completed, and displaying the appropriate icon files. The simple version would redirect to the advanced version using Javascript, that way as long as a user had Javascript enabled, they would get sent to the advanced version.

The interface was done, and seemed to work. The only thing left was to remove the icon files that it created. I wrote a simple garbage collector function that goes through and tries to delete up to X files that are older than Y number of days.

At this point, I thought I was done. That it was over. That Bradicon was complete. But I was wrong. Oh, was I ever wrong. Shelds, you see, told me to make a logo for it. A shiny box with an arrow in it, he said. And so, I did.

Finally, BRADICON!

Bradicon's logo

Bradicon