Friday Jan 11, 2013

Series On Embedded Development (Part 4) - Tunability

Writing a tunable application means writing your application in such a way that you can change it's behavior. This is different then having functionality available or not (optionality), it's changing the behavior of your application based on various factors. There's really two types of tunability, build-time and runtime. Within runtime tunability, there's also two types...static and dynamic.

Build-time tunability is when you set certain parameters at build-time. For example, if you use a cache and set the cache size based on a constant in your Java code, you're setting the cache size at build-time. Chaning a build-time tunable feature means you have to (obviously) re-build your application to change it's behavior. If you want to allow the users of your application to change it's behavior, then they'll need to be able to build your application to change it's behavior.

Runtime tunability is when your application changes it's behavior at runtime, so you don't have to re-build for to change its behavior. Runtime tunability can be static, set once when you run the JVM, or dynamic, changing based on certain criteria. The JVM uses runtime static tunability in several ways. One way it uses it is in the heap size. You can change the JVM heap size using a command-line parameter when you run the JVM. Another way is with the garbage collection. You can change the the JVM's garbage collector (GC) by specifying the GC on the command-line when starting the JVM. Both of these change the behavior of the JVM while it's running. Runtime dynamic tunability is when your application changes its behavior based on certain criteria it detects while it's running. For example, if you use large cache's in your application by default, but reduce the cache size when memory gets low, your using runtime dynamic tunability. Runtime tunability is more flexible then build-time and runtime dynamic is even more flexible then runtime static. Runtime dynamic allows your application to adapt as needed on the fly. However, it can be slower as you have to detect the criteria that trigger changes and then change the behavior of your application appropriately. With runtime dynamic tunability, you can move your application from device to device without having to make code changes, rebuild your application, or re-start it.

Tuesday Nov 27, 2012

Series On Embedded Development (Part 3) - Runtime Optionality

What is runtime optionality? Runtime optionality means writing and packaging your code in such a way that all of the features are available at runtime, but aren't loaded and used if the feature isn't used. The code is separate, and you can even remove the code to save persistent storage if you know the feature will not be used.

In native programming terms, it's splitting your application into separate shared libraries so you only have to load what you're using, which means it only impacts volatile memory when enabled at runtime. All the functionality is there, but if it's not used at runtime, it's not loaded. A good example of this in Java is JVMTI, Java's Virtual Machine Tool Interface. On smaller, embedded platforms, these libraries may not be there. If the libraries are not there, there's no effect on the runtime as long as you don't try to use the JVMTI features.

There is a trade-off between size/performance and flexibility here. Putting code in separate libraries means loading that code will take longer and it will typically take up more persistent space. However, if the code is rarely used, you can save volatile memory by including it in a separate library. You can also use this method in Java by putting rarely-used code into one or more separate JAR's. Loading a JAR and parsing it takes CPU cycles and volatile memory. Putting all of your application's code into a single JAR means more processing for that JAR. Consider putting rarely-used code in a separate library/JAR.

Friday May 25, 2012

Speeding up NetBeans Scanning

If you've ever experienced slow scanning while using NetBeans, as I have, I suggest you give one of the 7.2 daily builds a try (http://www.netbeans.org, click the 'Download FREE' button, click on the 'Development' link near the top right, and choose the download option which works for you). One of 7.2's features is background scanning, which does just what the name says. I have found it significantly improves the user experience as it relates to scanning...much less time is spent "waiting" for the scanning to complete. Version 201205250002 works very well, although I don't see a way to pick a specific dev build. If you get a build with a problem, try again later when a newer version is released. This upgrade is definitely worth while.

Thursday Apr 14, 2011

Group Tabs in Firefox

I recently stumbled on a useful feature in Firefox 4, Group Tabs. Group tabs let you group the tabs you have open in Firefox into convenient groups of your choosing. I found this by hitting the button to the right of the tabs list drop-down in the upper-right corner of Firefox, just above the home icon. Once there, you'll see a group frame window which contains all of your tabs in the form of icons representing each tab. To create another group, click and drag an icon outside of the group. You'll see the icon by itself in no group, and if you click on the tab icon, you'll see a new Firefox window open with just that tab in it. Clicking on the Group Tabs icon will get you back to managing your group tabs. To continue creating your group, click and drag another tab icon and drop it on or near the previous tab icon. You'll see a frame display around the two tab icons. This represents the new group. You can name the group by clicking near the top of the group frame (there's a faint pencil icon to the left of the edit box). Resizing the group tab frame will automatically re-size the tab icons. If you click on a tab icon, Firefox will display a window with only the tabs from the group in it, with the selected tab displayed. You'll notice if you hit the tabs drop-down, you'll only see the tabs listed which are in that group. Clicking back on the Group Tab icon will take you back to managing the group tabs. You can close tabs and move them between groups easily.

Using the Group Tab interface makes it easy to manage and find tabs when you have a lot of tabs open. You can find more information on Firefox's Group Tabs here: http://support.mozilla.com/en-US/kb/what-are-tab-groups

Wednesday Jan 14, 2009

Launchy Keystroke Launcher


I just found a really nice utility named Launchy. Launchy is a utility which is always in the background. You bring it up by hitting a key combination (Alt-Space is the default). It displays a simple box into which you can type commands to launch applications (e.g. firefox). Launchy indexes your hard drive and creates a catalog of the files on your system. When you start typing, Launchy suggests an application in which you might be interested. When it finds an application, it displays the applications icon and the name of the application. If it found the correct application, you can just hit the Enter key and it will launch the application. If it didn't find the correct one, you can hit the down arrow to see a list of all applications which match.

On Windows, Launchy indexes what is in your Start menu by default. You can modify this list. You can also change the default key combination to bring up Launchy. You can also enter file names into Launchy and it will launch that file using the default application for that file. For those of us who don't like reaching for the mouse, Launchy is a really useful utility.

Does anyone remember Borland's Sidekick?

Friday Jan 09, 2009

I Didn't Realize How Much I Missed My Smartphone


Yesterday I received my new phone in the mail. It's a Palm Centro. This wasn't my first choice since I believe Palm to be a dead platform (it was great for a while, but it has not evolved), however, my service provider wants to require me to pay for a data plan for every other smartphone in which I'm interested (but not the Centro)...and a data plan is something I'm not interested in...at least not yet. So the Centro it is. I actually wanted the RIM Blackberry Curve 8330 as the Blackberry platform has good market share and is growing. I require a decent platform mainly so I can get applications for it. I want to do more with my phone then just make phone calls.

I've had Palm devices for a while now, so I'm already familiar with the platform. The Centro is smaller then the Treo 700p it replaced, which I don't like as I have big hands and fingers. My service provider does offer some of the larger Palm phones, but they run Windows, and I'm not going there. Other then that...it's just like my old phone.

The biggest surprise for me, was just how much I missed having a more capable phone. I was using a really old Audiovox flip phone, with just the basic features and no QWERTY keyboard (which mean texting was a \*real\* pain) because I didn't want to fork out full price to replace my broken phone and I wasn't due for a phone upgrade from my provider for several months. The basic phone had no real scheduler with alarms, no memos, no ability to run decent apps, little memory (I had to delete SMS messages constantly to keep under the 99 message limitation for inbox and outbox), a crappy UI, poor battery life, and many other issues. Man, am I happy to have a smartphone again.

Tuesday Jul 03, 2007

Wrapping your head around Mercurial

I've recently had a chance to take Mercurial for a test drive. For those of you who haven't tried it yet, get ready for a mind-shift. The biggest difference between Mercurial and other Source Code Control Systems (SCCS's) is that most other SCCS's enforce a master-child relationship between the master repository and "child" repositories. You typically create a master repository which is used by everyone as the place into which changes will be put. This is a good thing. Everyone must commit to the master repository and everyone must make sure their commit is correct and doesn't break the build. Everyone gets the latest updates from the master repository. It's a central "meeting" place for code. One problem with this is you don't have a full, complete copy of the repository from which to work. This may cause a problem when you're taking your code mobile.

Mercurial is different in that it is a distributed peer-to-peer system. If you create a repository on a server in your group, there is nothing special about that repository from Mercurial's perspective. You pull the code from the repository on that server and now you have a copy of the code on your local machine which is equivalent to the one on the server...commit comments and all. Need to take the code on the road? Pull the code from either your local copy or the server's copy to your laptop...both are the same. Need to commit changes? Commit from your laptop to your local copy or the server's. If you commit from your laptop to the server, you'll need to pull the committed changes from either your laptop or the server to your local copy...again, both are the same.

In Mercurial, the "master" repository on the server is a convention only. You and your group decide you want to have a "master" repository on the server and so you treat it as such. Mercurial doesn't care. I think this model works better in our increasingly distributed, increasingly mobile work force.

Thursday Feb 15, 2007

SAMP (Solaris +Apache + MySQL + Perl + PHP + Python)

Sun recently announced the release of a SAMP stack optimized for Solaris 10, also known as the CoolStack. For those familiar with the AMP stack on other platforms, there is a 'recipe for success' which has step-by-step instructions to get up and running quickly. If you're interested in running an AMP stack on a really fast, robust platform, you owe it to yourself to try this out.

Tuesday Sep 27, 2005

My Last Palm Device?

If the only OS going into Palm's new phones is Microsoft Windows, then I currently own my last Palm device, and I've been a Palm user from day one. I've owned the original Palm Pilot, the Palm III, the Palm Vx, the Kyocera 6135 Smartphone, the Kyocera 7135 Smartphone, and now the Treo 600. I was looking forward to a Linux version of the Palm phone. I think there is still hope, but now that Palm is shipping a Windows device, possibly because they're late with their Linux-based OS replacement to the PalmOS, I think the chance for a Linux-based Palm phone is diminishing. I plan use more applications with a "back-end" component with my upcoming phone and security is a \*big\* concern of mine. I just don't think Windows delivers as a secure platform. Security on mobile devices is even a bigger issue then on the desktop, especially considering the upcoming pay features coming to mobile devices. If Palm doesn't ship a Linux phone by the time I'm ready to upgrade, then I'll be looking for a Linux phone from another manufacturer. How disappointing.

Friday Aug 05, 2005

Sony's VHS to DVD machine

Sony sells the Sony DVDirect VRD-VC20 machine, which transfers your VHS and camcorder tapes to DVD. A machine like this has been out for a while, but this is a new version of the box. The big advantage is that you don't have to deal with your PC to transfer videos from VHS to DVD, the machine does everything for you. You can hook your VCR directly up to the machine, or if you have a camcorder, you can hook the camcorder up to the DVDirect device and transfer directly from your camcorder to DVD. You can also hook up your computer if you want to do video editing before you burn the DVD. All this for under $300.

Thursday Aug 04, 2005

The Mozilla Corporation

There was an announcement today regarding a reorganization of the Mozilla Foundation. They've stated they're starting a Mozilla Corporation. I suppose in this day of "give the source code away for free and charge for support or a better version", it make sense that Mozilla would do this. On the web page they've dedicated to this issue, they state the corporation will "provide funds to support development, testing, and productization of the various Mozilla open source technologies". It appears the Mozilla Corporation will distribute Firefox and Thunderbird, but still give others the right to distribute Firefox and Thunderbird in accordance with the Mozilla trademark policy. They'll also make money by integrating various search engines into the product. There are no plans to charge for support or for the product. Most of the Mozilla Foundation "employees" (36) will move the new Mozilla Corporation. The Mozilla Foundation will still oversee the Mozilla open source projects.

I have no problem with them doing this, I just hope it doesn't scare off all of the engineers who have volunteered their time to make such great products and I hope they can continue to update it with new and inventive features..

Friday Mar 25, 2005

A Collaborative Internet Art Project

I recently came upon ZoomQuilt, a collaborative art project. This is a collaboration of 15 people who created an interactive art piece. The interesting thing is that once you go to the website, you can click and move the mouse from the bottom of the screen to the top of the screen and "move forward" (or backward) through the piece. As you do this, you're "zooming" into the center of the piece (you can't pan around). Eventually you will "move through" the current art piece and into the next art piece. There are several pieces you will move through, eventually coming back to where you started. I think one of the most interesting things is being able to enlarge what you see. It's like looking at you favorite painting and being able to zoom in to see it in more detail, you're surprised to see things you didn't even know were there. Of course, in this art piece, as you zoom in, you really do see things that "weren't there". The images are a bit "dark", but I'd like to see more of these zoom quilt's on the Net.

About

Darryl Mocek

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today