Setting up the Android SDK on Windows 7 64bit, with a 64bit JDK / JRE is a bit less straightforward than one would expect, thankfully though the solution is quite simple. There are two settings that need to be adjusted to make this work – otherwise you’ll get an error indicating that Java can’t be found.

Step 1: Modify your PATH to include the bin folder of the JRE. Mine looks like this:

C:\Program Files\Java\jre6\bin

Step 2: Set the ANDROID_SWT variable (you’ll probably need to add it) to the \tools\lib\x86_64 folder of the Android SDK. Mine looks like this:

C:\Android\SDK\tools\lib\x86_64

With these two changes, everything seems to work as expected. Why this is required on 64bit but not 32bit I’m not sure, but this does seem to solve the problem.

Yup, it’s here! The next version of the .NET Framework has been released, while this isn’t a major release (as not much has changed), it is a milestone. This release adds support for the WPF, or Windows Presentation Foundation, the new presentation framework that will enable a new generation of remarkable interface designs. 

If you’re a developer, get going and get started – this is going to be fun. :)

Tagged with:
 

The coding guidelines at my job have a rather interesting requirement: code must be wrapped at 100 characters. If you fail to meet this on any line of code, you fail the code review. In the year I’ve worked at this company I’ve learned to guess how long a line is quite well. As of today, no more guessing.

Here’s a quick registry hack to add a vertical line in the editor at any column you wish, just double click the REG file and you’re set. The contents of the file look something like this:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\
  VisualStudio\8.0\Text Editor]
"Guides"="RGB(128, 128, 128) 100"

[HKEY_CURRENT_USER\Software\Microsoft\
  VisualStudio\7.1\Text Editor]
"Guides"="RGB(128, 128, 128) 100"

The setting works something like this: The RGB() part defines the color of the line, the number at the end defines the column the line is displayed at. If your style defines a limit on the length of a line, this is a great way to see at a glance if you’re going too long.

Note: This adds the key for both Visual Studio 2003 and Visual Studio 2005.

Update: The original REG file I linked to had a formatting error that caused the data to import improperly. I’ve replaced the file with a working copy.

Tagged with:
 

While facing an interesting research challenge, digging into the inner working of Windows, I realized that I needed to change a registry value. That’s simple enough, I fire up RegEdit, make the change, then politely as RegEdit knows how, it told me that I couldn’t change the value! Being one that hates when my computer tells me I can’t do something, I had to find another option.

So after some research, I found my answer: sc. This is a great little utility (included with Windows), and made the task of running an application as SYSTEM* much easier. At this point some of you may be wondering why I didn’t just use RunAs instead, as it’s designed to allow execution as another user. Well, from all that I’ve found, there is no way to get RunAs to spawn a process as SYSTEM, one of the downsides of SYSTEM not being a true user.

Another option that I found (somewhat) attractive initially is RunAsEx, an open source, GUI based version of RunAs. This could be useful, but I found it to be more hassle than it was worth. Still might be useful for somethings, but with all the bugs I found in it, I knew there was a better way.

Now, back to the solution I chose: Using sc to create a service that will execute the application I’m after. This works because by default all services execute under the SYSTEM user context, so all we have to do is create a service to call the application we need. Surprisingly simple, and it works quite well.

Creating the service looks something like this:

SC CREATE AcDebugSvc binPath= "regedit.exe" type= own type= interact **

This creates the service, so that now all you have to do is start the service (SC START AcDebugSvc ***) and you’ll see your copy of RegEdit. If you check in Task Manager, you’ll be able to confirm that it is actually running as SYSTEM. This is an extremely powerful debugging tool, as it allows you to instantly execute any application as the most powerful user that Windows offers.

Once you are done with your work, just delete the service (SC DELETE AcDebugSvc) and call it a day, that simple. This can also easily be scripted if you tire of typing the commands so often, and it can also be used with most applications. Using this for the Command Prompt (binPath= "cmd.exe /K start") and for Task Manager (binPath= "taskmgr.exe") both strike me as being quite useful.

* WARNING: As I hope most of you know, System is a very powerful account, it’s almost limitless in what it can do. If you aren’t careful while working under this user context; you may end up with a rather expensive paperweight instead of a computer. You have been warned.

** Note: As odd as it is, the spaces after the equals and before the value of the parameters is quite important, the call will fail if you omit them.

*** Note: You’ll get an error message (“The service did not respond to the start or control request in a timely fashion.“) when you call this, it’s nothing to worry about. The reason that it occurs is that to respond to the message it receives the target application must be designed to operate as a service. Since we are using this for other purposes we, we don’t really care.

Tagged with:
 

Recently a programmer I know decided that it was time for a career change, leaving the IT field entirely. This gave me cause to think; what does it take to be a great developer. Many people go through school believing they have what it takes, only to receive a rude awaking once they enter the real world.

Before I go on, I think it’s important to define what I mean by developer, and the differences between a developer and a programmer. Here are a few key aspects that every great developer most possess:

  • Is able to take a very basic list of requirements and develop a stable and maintainable application design and architecture.
  • Understands that working with end users is critical in creating great software.
  • Has an intense desire to not just learn, but to know everything about the field they work in.
  • Loves software, and creating it.

There are many programmers, but developers are fewer but add far more value than a programmer. Eric Sink defines a developer as “programmers who also contribute in non-coding ways” – I think it’s important to understand that coding is just one part of creating great software, and the great user experience that goes with it.

But I digress, back to the topic. When new programmers come out of school, they often have little idea of what the industry is truly like. They often believe that they have a strong understanding of the industry, the methods and techniques used, and what life will be like working as a programmer. The reality they expect many times doesn’t resemble the reality they experience.

To succeed, new programmers need to expand their knowledge and try to become true developers, not just programmers. Unless they find jobs at a major software development company, such as Microsoft, odds are they will need these extra skills to get ahead.

Learning how to better troubleshoot issues, working with end users that are having issues, or have ideas for changes will be a step forward to become a developer. Another item to focus on is finding an understanding of design and architecture so that they are more capable of designing a maintainable large-scale application; a key value for small development groups. 

To be a great developer, programmers must have a passion for software, both in using and creating. This is something missing in many of the recent graduates I’ve met. These are the programmers that will end up going the route of changing careers; those without a passion simply won’t make it.

Note: This is from the perspective of small software teams; larger groups may have somewhat different priorities. 

Tagged with: