dojo dgrid with horizontal scroll

There are a few CSS items needed to enable horizontal scrolling in your dojo/dgrid and OnDemandGrid. This isn’t currently documented on the dgrid help pages so I’m posting it here. For Dojo users reading this, I’m referring to the “new” dgrid beta currently hosted on github, and not the legacy dojox datagrid.

Basically, you need to assign a width to the dgrid, the cells within the dgrid, and potentially to any columnSets you may be using. Once you do that you should see the horizontal scroll bar show up. I’ve noted on some apps that use a grid width of 100% the horizontal scroll bar doesn’t show up until the user adjusts the screen size to be smaller.

I would provide a full example but there aren’t any public and free CDNs that I know of hosting the dgrid custom component right now:

<style>
/* Assign both height and width to the div that will hold the dgrid */
#grid1 {
    height: 375px;
    width: 750px;
}

/* Assign a default width for all grid cells */
.grid .dgrid-cell {
    width: 80px;
}

/* If you have one or more columnsets then assign them a width. */
.grid .dgrid-column-set-cell {
	width: 50%;
}

</style>

<div id="grid1" class="grid"></div>

Smartphones aren’t getting any smarter

As an Android and mobile web developer, I feel compelled asking people I know or meet a lot of questions about their phones. One trend I’ve been seeing is feedback that smartphones, themselves, aren’t really getting any smarter. The ironman/crossfit marathon to add new features at warp speed has left behind a trail of cool phones that have some fundamental issues. So, I’m going to take a look at some of these here.

To put things in perspective, at Google I/O 2013, Sundar Pichai announced that there have now been 900 million Android activations world-wide to date. That’s not including iPhone activations, of course. But, Yeow, that’s a lot of phones! So, let’s look at some things that haven’t improved much. It’s almost like Newton’s Third Law of Motion can be applied to smartphones: while some things improve, other things must take a back seat.

Security. I can say this with certainty – I have yet to see or hear about a smartphone advertisement that says something such as “we’re striving to make this phone the most secure phone yet.” One thing is clear that Apple’s app vetting process helps reduce the level of malware compared to Google Play. Sure I understand that nothing is 100% secure, but the operating system vendors and the handset vendors could at least talk about it.  And, why don’t smartphones come with built-in, optimized versions of virus checkers and anti-malware tools like Windows PCs and laptops?

Most people’s lives could be seriously disrupted by the data stored on your typical smartphone, and we lose these and leave them behind accidentally by the thousands, and we inadvertently install malware.

Case in point – do a search on Google or bing using the term “smartphone security”, and see how many articles are published by the major phone vendors about security and securing your phone. The top result is by the FCC about their Smartphone Security Checker.

Restoring an Android phone. If you reset your droid or buy a new one, restoring everything back to the way it was and in it’s exact place, well…a very manual process. This is not very user friendly. Hey Android vendors, you should take a lesson from Apple on this one.

Display brightness and energy consumption. Phone displays appear to continue to be the “number one” draw on battery life. I’ve started to think most (many?) like their screens really bright. I mean realllly bright. It’s funny, I keep mine pretty dim to squeeze as much life out of the battery as possible, and I’ve lost count of the number of times people have said something like “how can even you see what you are doing??”

GPS energy consumption. My Garmin GPS lasts over 17 hours of continuous usage with two AA batteries. The battery on a typical smartphone has much greater storage capacity, but in actual field tests I’ve killed smartphone batteries in as little as 4 -5 hours of continuous GPS usage. GPS used wrong is a huge draw on the devices battery. Sure, a smartphone is doing a lot more work than a typical, single purpose GPS. But, my point is why hasn’t GPS battery consumption improved over five generations of smartphones? Those of us who build GPS-based native and web apps have to jump through hoops to optimize battery life in applications that do more than take a snapshot of the users current location. Some of the algorithms we write should simply be built-in to the firmware.

Charging times. Now I admit this varies from phone-to-phone but it’s still not very fast in general. I know I have said before that many people are never more than 10 feet from a charger, but for those of us who aren’t that attentive to charging I can say charging times can be an issue. For example, my iPad (okay it’s more of a tablet than a smartphone) is the slowest charging device on the planet compared to my original Google Ion which charged from dead to full in about an hour and a half. Sure, I understand there is a huge difference in battery size, but my point still stands. The cute, itty-bitty charger for iPad is way under-powered for the needs of charging a larger battery.  And, maybe some people are okay with that?

Planned Obsolescence.  This one is totally on Android. I’ve lost track of the number of Android phones that I have sitting around that have been rendered obsolete because the handset manufacturer provided one or maybe even two OS updates to the phone, and then they stopped. They become obsolete in the sense that some apps don’t run on older versions of the operating system. Sure, the upgrades are enticing (better camera, more memory, faster processors, etc. etc.) but what if someone doesn’t want or need to upgrade?

This may become more of an issue for people as some carriers are stopping their subsidies of phones and pushing users to carry the cost of a new phone directly. And new phones can give you sticker shock. If you have to pony up $350 – $600 for that new phone and all it’s advertised features, you might not be inclined to upgrade phones as often as you used to.

Wrap-up. So, I’ve written a mish-mash of different things that should be improved for both Android and iPhone. What I’d really like to see, and it probably won’t happen, is for Android, Apple and Microsoft to take a step back from the feature/functionality marathon and work on some fundamental issues to build an even stronger foundation for the next generation phones.

 

Mac vs PC: A developers perspective

I’ve been a PC person since the beginning of time, and I recently decided to switch to a Macbook Pro.  I’ve gotten questions recently from folks about how I like it. So, this post summarizes some of my thoughts and discussions on the Mac vs PC debate reframed into a software developer perspective – and without all the hype. I think it’s safe to say I’m a power user and my needs go well beyond a typical consumer. So my ratings reflect that mind set.

Chassis: Rating A++++

While this has nothing to do with functionality, per se, and everything to do with aesthetics I’ve never had a more beautifully built ‘machine’. The brushed aluminum looks great and the device feels rock solid. It doesn’t creak like old wooden stairs when you hold it like a dinner platter while carrying it from meeting to meeting. The construction of Windows laptops I’ve used, and some of them were considered top-of-the-line, mostly pale in comparison. It’s like comparing a brand new Porsche fresh off the factory line with all it’s power and state-of-the-art construction to my beloved but campy ’95 Camry.

Speed: Rating A

I have had this discussion with a number of colleagues. The speed from the Macbook Pro comes mainly from the SSD (Solid State Drive). I’ve seen Windows laptops with SSDs perform just as admirably when doing CPU intensive work such as large software builds.

Screen: Rating A++++

The screen on the Macbook Pro is…wow. In all fairness there are some really awesome screens on the latest generation of Windows machines too.

Easy of Use: Rating B

Now’s were things get controversial. Let me explain. I believe that Mac’s are just as easy to use for the 80% of things most every-day consumers use them for as Windows machines. But, remember I’m a power user. So, once you step off the cliff into the 20% of things that aren’t intuitive I think Windows machines are much easier to manage because it’s more GUI oriented. Let me give you an example.

Setting up Apache, creating virtual directories and ongoing management of the web server for newbies isn’t exactly intuitive. I’m not talking about cobbling together the pieces needed to host simple HTML web pages; I’m talking about hardcore web server abuse. Granted my bash skills have gotten rusty after years of using Windows, and yes some things are very easy to quickly do in a terminal window, but having lots of GUI interfaces are nice when you are feeling lazy. Some days you just don’t feel like recalling complex and arcane sequences to manipulate your github account. Case in point for GUIs, I’d say compare the easy-of-use of SourceTree to using the command line when doing intermediate to advanced github manipulation. When I started using my Mac I would have loved to have something similar to IIS for manipulating Apache.

Stability: Rating A-

I do want to point out that my Mac has locked up and I’ve had other miscellaneous hiccups with various parts of the operating system that required a reboot or a force quit. Some applications have given me fits for example, I’ve had to manually kill off Charles debugging proxy quite a few times when it went hog wild and chewed up vast chunks of my available CPU. Having used numerous Windows laptops and untold number of Windows-based applications, I haven’t seen anything like that in years. Granted these issues on my Mac have been few and far between, but they did happen…and it got my attention.

Attaching to other devices: A+

The bane of Windows was trying to connect to various devices and finding the right device driver from various manufactures is always lots of fun. Connecting to smartphones has never been easier for me than on my Mac. The only trouble I ever had was connecting to a network printer. That turned out to be counter-intuitive to a newbie and took several calls to tech support and two days to figure out. I’d say connecting to network printers, which is a common task in the typical work environment, is much easier with Windows.

Using with Corporate Software: C

This experience hasn’t been so great overall. Using a Mac on a PC-based network has its challenges, such as connecting to network printers. I’ve also noticed that the Mac versions of PC software typically have less functionality. I don’t know why this is the case. For example, for some strange reason the Mac version of PowerPoint has less functionality for drawing shapes, and it has a very limited selection of built-in clip art. Go figure. Why do I use PowerPoint? Because sometimes you have to collaborate on presentations with folks who use Windows machines, or maybe you have to share your presentation and the vast majority of users have Windows machines.

Battery Life: Rating A

I seriously debated with myself on including this. It’s so subjective but it always, always comes up in conversations. At what I’d consider a medium level of CPU usage, I can eke out about 4’ish hours of battery life. There, I said it. What I mean by medium level of usage is doing build after build using an IDE, or doing numerous intensive page refreshes while banging out a web app as opposed to hanging out and doing general internet surfing or using a Word processor.

But, to be honest it’s rare these days during anyone’s normal, everyday routine that you aren’t within close proximity to a power outlet. You can even get power adapters for use in your own car if you want. The exceptions are when you travel and then power can get scarce at some Airports, certain conferences, some particularly crowed coffee shops, and certain types of public transportation. Some airlines have graciously even gone to providing 110V outlets. I mean, short of those exceptions I rarely have need to exercise the full life of my laptops battery prowess.

Noise level: Rating A+

I’ll end this post on talking about fan noise. 99% of the time my Mac doesn’t emit any sounds other than the tappity-click-clack of my poking at the keyboard. I love it. All my other Windows laptops have had fans that often were noisy enough to make it hard to hear during meetings. I remember being shushed a couple of times during particularly intense meetings when the virus checker kicked off and caused the CPU to generate enough heat that the associated fan level noise exceeded that of an F-18 in full afterburner. The only time my Mac’s fan starts to get noticeable is when something I’m doing continuously drives the CPU past 30% for an extended period of time. Examples of this include video conference calls and some video based web pages.

Conclusion

There are certainly many more things I could discuss, but I felt these were the highlights. Overall my Macbook Pro has been a very nice machine and I’ll give it an A rating. It’s the nicest looking laptop I’ve ever used. But looks aside, it has proven to be a fairly stable and fast performer. Access to everyday functionality is easy enough to figure out. As a newbie Mac power user, some of the advanced settings are counter intuitive and some seem needlessly arcane. I’m glad I’ve been able to actually try out a Mac after all these years of hearing about them.