Category: Technologies and Platforms

Tiling a 2-D Polygon using C# GDI+

Tiling a Polygon

Tiling a Polygon

One of the most challenging problems I came across working on a .NET PDF Annotator and Editor application was to tile a 2-D polygon and also accurately determine the number of tiles that fill the surface of the polygon.  The tiling part was not as much of a challenge as the counting part. The tiled polygon was to be rendered on a PDF document since the application in question is a PDF Annotating and Editing tool. We looked for anything the third party .NET PDF rendering/manipulation API that was used could provide for the tile rendering but there was nothing unfortunately.
Continue reading »

Flashback: The iPhone and the Early Days of the Web

269/365 - why even have that deal?
Creative Commons License photo credit: B Rosen

I remember my first real grownup and serious web project outside of the university environment. It was 1994 and SSL was a novelty. People were making insane predictions that one day up to $600 million (think Dr. Evil) worth of consumer goods would be sold on the web worldwide. In 2007, just Canadian B2C sales were US$12.9 Billion.

Some folks, especially startups and smaller companies, saw the web as an opportunity to shake up the established order and establish a new sales channel or an entirely new business model. They invested what they could in building the first of what became known as e-commerce sites. Among established players, and some more conservative smaller players, there was initial hostility toward the new medium. When in 1994 I proposed to Ameritech (now part of SBC/AT&T) that they bring their lucrative print yellowpages online, I was run out of Hoffman Estates on a rail.

Continue reading »

Topics: ,

A Slight Correction to using PureMVC with Vaadin

A while back I looked at the Vaadin Plugin and tried to make it work with the Multiton PureMVC. Back then I proposed the following code:

 
public static ApplicationFacade getInstance() {
   if (instance == null) {
     // nuke the multiton so we can do the grails recompile
     if (ApplicationFacade.hasCore(CORE)) {
       ApplicationFacade.removeCore(CORE);
     }
     instance = new ApplicationFacade(CORE);
   }
   return instance;
 }
 

A little more noodling and you'll see that doesn't work. In a multi-session environment, each user will need his own core. Furthermore, inactive cores should be harvested, otherwise we will have a memory leak.
Continue reading »

Topics: , ,

Sanity Amid the Tablet Hype

Rosetta_Stone

As January 26th, the rumored date for Apple's rumored tablet unveiling draws near, the hype and anti-hype keeps getting more and more over the top:

Five Ways Apple's Tablet May Change the World

The world doesn't need an Apple tablet, or any other

and the inevitable

3 Reasons A Microsoft-HP Tablet PC Would Trump Apple

If you want to keep up to date on the rumors, Gizmodo has a regularly updated run-down here.

There are a couple of places that have more informed speculation and insightful commentary - I'd recommend these three in particular:

Antacid Tablet by ars technica's John Siracusa:

... There's also the popular notion that Apple has to do something entirely new or totally amazing in order for the tablet to succeed. After all, tablets have been tried before, with dismal results. It seems absurd to some people that Apple can succeed simply by using existing technologies and software techniques in the right combination. And yet that's exactly what Apple has done with all of its most recent hit products—and what I predict Apple will do with the tablet. ...

So how will an Apple tablet distinguish itself without any headline technological marvels? It'll do so by leveraging all of Apple's strategic strengths. Now you're expecting me to say something about tight hardware/software integration, user experience, or "design," but I'm talking about even more obvious factors:

• Customers - Apple has over 100 million credit-card-bearing customer accounts thanks to the success of iTunes.
• Developers - Over 125,000 developers have put over 100,000 iPhone OS applications up for sale on the App Store. Then there are the Mac OS X developers (though of course there's some overlap). Apple's got developers ready and able to come at the tablet from both directions.
• Relationships - Apple has lucrative and successful relationships with the most important content owners in the music and movie businesses.

These are Apple's most important assets when it comes to the tablet, and you can bet your bottom dollar that Apple will lean heavily on them. This, combined with Apple's traditional strength in design and user experience, is what will distinguish Apple's tablet in the market. It will provide an easy way for people to find, purchase, and consume all kinds of media and applications right from the device. It's that simple.

Thoughts on what an Apple tablet should be – or not by Andy Ihnatko

Apple always asks themselves simple and stupid questions like “How will this device be used?” and “Will this be used by human beings with, I mean, arms and hands and fingers?” and stuff like that.

The iPhone UI isn’t a desktop user interface where a pen takes the place of a mouse ... which is the model that previous smartphones followed. It was designed to be held in one hand and tapped with your thumb. Occasionally you’d use the index finger of the right hand to key things in.

You want to try to figure out the UI of the RAT? Go get yourself a comic book, or any other rectangle that measures roughly 10” on the diagonal. Hold it as though you’re reading what’s on the surface.

You see the problem? Your fingers get in the way. Think about how big that surface is, too. That’s a lot of acreage to scan, looking for the right buttons to push.

While you’ve got it in your hands, imagine that it’s a sheet of thin steel. That’s heavy, isn’t it? Hard to hold up for long periods of time.

Think about how a user interface would have to incorporate those observations. Now imagine that you’ve been doing this experiment for four years and not four minutes.

That’s a very long list of observations. If you didn’t come up with a workable solution, don’t worry: I think Apple has.

and

The Tablet by Daring Fireball's John Gruber.

... The way Apple made one device [the iPhone] that did a credible job of all these widely-varying features was by making it a general-purpose computer with minimal specificity in the hardware and maximal specificity in the software. And, now, through the App Store and third-party developers, it does much more: serving as everything from a game player to a medical device.

Do I think The Tablet is an e-reader? A video player? A web browser? A document viewer? It’s not a matter of or but rather and. I say it is all of these things. It’s a computer.

And so in answer to my central question, regarding why buy The Tablet if you already have an iPhone and a MacBook, my best guess is that ultimately, The Tablet is something you’ll buy instead of a MacBook.

Gruber's a bit more gung ho than Ihnatko or Siracusa, but they both make a pretty compelling case that something very interesting is about to happen over the next year.

500x_apple-tablet-natgeo

Prediction: The Teens will be the Decade of Mobile

Abacus, Filofax, wrong result
Creative Commons License photo credit: matsuyuki

I've made my fair share of predictions, and this may seem to be a layup, but I think it's a prediction worth making anyway: mobile devices and applications will transform business and every day life in the next decade.

Why does this seem like such a layup? Well, look at the iPhone and the ecosystem of applications and companies springing up around it. Android and Blackberry are trying to jump in on the business and everybody and their brother is cooking up a connected mobile device. And yes, that's obvious. Mobile devices are going to increase in importance in 2010 and if you don't already have an iPhone app cooking to complement your other online channels, you're behind the times.

But if you're just thinking that more iPhone applications are going to be the end of it, you're in for a rude awakening. Businesses have just started consolidating after the disruptive years of the 90's and aught's, with the transformative effects of the web largely digested by the marketplace (the newspaper industry is still thrashing but will soon succumb). A new disruptive decade is dawning that may see the passing or fundamental transformation of industries as varied as telecom, credit card and broadcast television/cable. Prepare to take your business through a roller coaster ride every bit as challenging as the web revolution. Continue reading »

What does Google Chrome do for Mac based Flex Developers?

Do you know every detail in the Flex framework by heart? Do you also know all the other libraries that you use by heart? Well I don't and I often have to reference some online resource while developing.

For instance, I always have Action Script Language Reference, Wikipedia, some library API site(s), Gmail and a dozen other ones open + the debug version of the app at hand.

So what used to happen when you but a breakpoint in Flex Builder with all these tabs? They would be unavailable and any process happening inside of them could not be relied on. Since not all code runs well on first attempt, if the app crashed while testing ( think 3D, data intensive apps, etc.) the browser and all the tabs went down with it.

My solution so far was to use Firefox as a development browser and Safari ( since I'm Mac based ) as a browser for references and everything else. For crashing resolution, Firefox has a nice "Restore" option but it's not fun waiting for 15 tabs to reload.

So Google Chrome recently came out for Mac. It didn't impress me on Vista so I didn't care much. I guess I was in between of curious and bored so I decided to give it a spin.

What a pleasant surprise to see every tab running in a different process. My workflow feels so much better now that I'm not afraid that a bad line of code is going to take down my whole browser.

I've heard that IE8 also runs tabs as different processes but I'm not crazy about returning to development on Windows. I did try out Chrome on Windows 7 as a result of the Mac test and all the issues I've seen the first time around have been addressed. Kudos to Chrome development team.

Let's not forget to mention all the features that are missing on Google Chrome for Mac, primarily the lack of Bookmark Management, but Google Bookmarks or any online bookmarking service will do for now.

I can not wait to see more development being done on Google Chrome for Mac and it getting out of beta. I will not uninstall Firefox anytime soon but as a Flex developer I give Google Chrome for Mac high scores for beta.

Data Visualization is About More than Just Pretty Pictures

waalerToo often in software development projects, we're asked to provide what I would call thoughtless reports. By this I mean a collection of tables and charts that depict and enumerate standard relationships. There's nothing wrong with the reports themselves, mind you -- we know how to present relationships in graphical form. No, the problem is that no one has given much thought to the relationships that are being depicted.

You've probably heard about the finding that in children, shoe sizes and handwriting quality are highly correlated. It would be wrong to conclude, however, that one causes the other. In fact, as children mature, their shoe size increases, as does their cognitive ability and their motor skills. They are all dependent on age. Continue reading »

Nice List of Data Visualization Tools

Theresa Neil over at InsiderRIA has a nice post about 28 data visualization tools. You could google these yourself, but she's actually put together a bunch of screen shots and collected them all in one place.

If we're honest about it, these aren't really "data visualization" tools. They're some decent graphing and charting libraries. Data visualization is more than just pretty pictures. Providing the user with direct manipulations and other interactions is also a key ingredient to making the data understandable to system users. As such, these 28 tools only provide one piece of the puzzle.

GWT 2.0 RC1 Released

gwtWell, GWT 2.0 RC1 (yes!) is out. I was going to wait for a while with some of my new projects until switching them over to GWT 2.0, but given the pace of the GWT 2.0 project, I may just switch them over now rather than going through a painful migration.

I'm especially eager to use UiBinder to do declarative UI creation. Just specify how your interface should look in XML:
Continue reading »

Topics: ,

Released: QxWT-0.8.2-RC1 – GWT Wrapper for qooxdoo

I used to scratch my head at the name for the JavaScript library qooxdoo. That's until I ran into the developers of the library at an Ajax Experience event in Boston a few years ago and they pronounced it "Kucks Du" as in "Was kucks du" or German for "what are you looking at?" :-) Beyond the basics, qooxdoo is a mature collection of JavaScript widgets, despite the authors' conservative versioning policy (they're still only at 0.8.3).

It's taken them long enough, but they've finally released a wrapper for GWT, named QxWT. Best of all, they have a commercial-friendly open source license. If you're put off by GXT and it's license, you owe yourself a look.

Topics: ,

Griffon Tutorials: Adding Useful Logging

groffon
I'm gathering as much as I can on Griffon and how people are using it. Some things you can translated from Grails, but not everything. So here, as a public service, is the first of many Griffon tutorial pointers.

Dabble->Scribble has a nice blog entry on including log4j logging in Griffon. My favorite part? One of his goals for logging is to "Filter out the cruft from Groovy's massive stacktraces." Amen.

Topics: , , ,

GWT and the Static Versus Dynamic Religious War

Never get involved in a land war in Asia.

-- Vizzini, The Princess Bride

.

gwt
Also, never get involved in a religious war about statically versus dynamically typed languages. Well, maybe just this once. :-)

Periodically, an angry Javascript developer will let loose and flame GWT as a misbegotten spawn of evil. Then all the GWT developers point and chuckle and move on to developing more cool applications. Every so often, though, someone will make a thoughtful comment about GWT, and then we have a fruitful discussion that helps clarify what GWT is and what it does and doesn't do well.

William Shields has either posted such a thoughtful comment or a very high end version of a flame, entitled Lost in Translation or Why GWT Isn’t the Future of Web Development. It is well worth reading, along with Google's Joel's somewhat heated response.

Continue reading »

GWT 2 Milestone 2

gwtIt's been out a few weeks, but I thought I'd point out that's it's been pushed. Mostly some changes to the LayoutPanel.

Topics:

Better JavaScript Development with Google Closure Tools

closure
Google has release Closure Tools, the set of tools they used to write applications such as Gmail. What is it? It consists of three parts:

  1. A compiler which is a "JavaScript optimizer that compiles web apps down into compact, high-performance JavaScript code. The compiler removes dead code, then rewrites and minimizes what's left so that it will run fast on browsers' JavaScript engines. The compiler also checks syntax, variable references, and types, and warns about other common JavaScript pitfalls. These checks and optimizations help you write apps that are less buggy and easier to maintain. You can use the compiler with Closure Inspector, a Firebug extension that makes debugging the obfuscated code almost as easy as debugging the human-readable source."

    So it compiles JavaScript into JavaScript and makes it behave more like a statically typed language.

  2. A library which contains both widgets and datastructures and algorithms. Sort of the standard library that JavaScript was always missing.
  3. A templating system you can use to assemble a user interface.

Since this system has been in use at Google to develop real applications over a long period of time, I expect it to be a fairly robust system. In many ways it solves some of the same problems that GWT is trying to solve, but in a different way.

I'll see if I can kick the tires over the weekend and post about it next week. So many cool tools and frameworks, so little time...

Grails and Google App Engine: Birthing Pains

grails_logoWhenever you can get a free, publicly available place to deploy your applications, your first instinct is to grab it with both hands. Google App Engine is one of those places. Each developer can deploy up to 10 different apps in development mode.

I've been working on a grails app recently that uses the grails App Engine Plugin. Along with the GORM-JPA Plugin, which gives you some  of the usual grails GORM goodness, you can write some reasonably interesting grails apps.
Continue reading »

Launch: Pathfinder Newsletter

    Get a monthly update on best practices for delivering successful software.

    Subscribe via email


    Subscribe via RSS      RSS icon

Topics

Search

WordPress

Comments about this site: info@pathf.com