Posts

Showing posts from 2010

Installing MySQL 5.5 on Mac OS X 10.6

Or should I say "unable to install MySQL 5.5 on Mac OS X".  My first attempt at installing MySQL on Mac was with MySQL 5.1 on Snow Leopard.  That worked as expected and without any issues.  MySQL 5.5, however, was a bit tricky. After the install, I got this error on start up: 101224  9:50:00 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. MySQL is not started at this point, so running mysql_upgrade also fails (not that there is anything to upgrade, it's a fresh install). Viva la Google!  After a little digging on Google (ok, a lot of digging), I found this article in the MySQL forums: MySQL Forums :: Install :: Unable to install MySQL 5.5.8 on MacOS 10.6 http://forums.mysql.com/read.php?11,399397,399606#msg-399606 Worked like a charm! So, the complete steps: Download the dmg and install per the reference manual:   http://dev.mysql.com/doc/refman/5.5/en/macosx-installation-pkg.html Edit: /usr/local/mysql/supp...

Identifying Datastores Configured in VMware Server 2.0

I ran into the need to start a VMware Server 2.0 virtual machine from the command line.  The vmrun command uses the data store name to locate the vmx file. Unfortunately, the system documentation wasn't readily available, so I needed to determine what stores were configured. There are a few ways to do this: At the command line as root: vmware-vim-cmd hostsvc/datastore/listsummary This will list all datastores in inventory on the host.  And... vmware-vim-cmd vmsvc/getallvms ... will list all vms in inventory on the host, noting the datastore name and path to the vmx file. The caveat to that is you need to be running the command as root.  If you're security conscious like I am, then ssh (how I was connecting the the headless host) doesn't allow root access, even doing an "su" won't work.  So unless you've given permissions to a non-root user to access the certificates and configs, the command line utility won't work.  So now what?  Well, thankfull...

Simulating Latency and Bandwidth Restrictions in WCF

Image
If you're developing WCF applications that will run over a WAN, VPN, or the public internet, then network bandwidth and latency is a concern. Messages take longer to transmit over these networks than over your local area network (LAN). As such, part of your development and testing needs to include testing the application over these typed of "slower" connection. To perform this testing there are two main options:  have a connection at your disposal, or simulate one.  Most of us will probably have to simulate one.  There are a few projects out there that are basically bridges, typically linux based, that you put between your client and server that allow you to simulate these slower connections. If you are a Java developer, you're probably familiar with JMeter. JMeter's approach doesn't involve a bridge, but rather simulates the latency at the client. I was chatting with Peter Lin, a friend, colleague, and JMeter committer, about it one night. After he mentio...

Automatically Close Braces in Visual Studio

If you're an Eclipse or Netbeans user, you'll be very familiar with this topic.  These IDEs automatically close braces, parenthesis, quotes, and brackets -- ( {},[],(),"",'' ) -- for you as you type in the code editors.  It may sound like laziness, but it can actually save you debug/troubleshooting time as it ensures (well, helps to ensure) that for every open you have a corresponding close. One complaint I've always had, along with many other people based on my Google searches, is that Microsoft Visual Studio does not have this functionality.  If you're like me and spend a lot if time in both the Java IDE's and Visual Studio, you probably find it very annoying that the editors don't behave quite the same.  It can really mess with your muscle memory and make you less productive. While there are a few very good commercial packages out there that provide this functionality (along with a host of other cool toys), I haven't been able to...

Open Source Efforts at Milestone

Even before I founded Milestone Technology Group, LLC, I was, and still am, a proponent of open source software, and often looked there first when architecting business solutions.  Because of this, open source is very much part of the Milestone's culture.  It would be hypocritical to say we're a proponent and not also provide back to the open source community.  So in my spare time, and under the umbrella of Milestone, I've started putting together some open source projects and pushing them out to the community via my account on sourceforge.net.  These projects will also be available from Milestone's web site in the near future.

Setting Up a Reporting Database

Image
Using a live OLTP database for complex reporting has a significant performance impact on the OLTP application.  A common architectural design is to have a separate reporting database from your application's OLTP database. Before I get into reporting database options, a critical area to look at is tuning the queries for the reports.  You should start there before introducing a more complex and costly environment.  Just because a query is fast on a 10GB DB doesn't mean it will be on a 100GB DB. Assuming you've fine-tuned the queries and database, let's take a look at ways to create a reporting database. I've used several approaches in the past, each with great success.  Like anything else, there are different solutions that fit different scenarios.  I list a few here, but instead of breaking out pro's vs con's, which are subjective, I'll simply list the caveats to using each. There are several things to consider when choosing a reporting database s...

Apple and Mac OS X for Developers

Well, I did it.  I made the leap from the PC world to Mac.  Not that it was a far leap; I've been using Fedora as my primary OS since 2005.  The decision for me wasn't so much the "Apple sex-appeal" or even the OS, but more the engineering--it was the only i7 laptop I test drove (and I tried many) that didn't cook my wrists and could last an entire 8 hour business trip on battery. Anyway, I thought it would be worth while to start a blog mini-series on my experiences as developer, architect, and business owner with Mac. The new toy: 15" Macbook Pro (April 2010) High-Res Anti-Glare screen Intel Core i7 @ 2.66 GHz 4 GB RAM 500GB 5400RPM Hard Disk Mac OS X 10.6.3 Software: Eclipse 3.6 Netbeans 6.9 Mono 2.6 Monodevelop 2.4 Oracle SQL Developer 2.1 MySQL 5.1 JBoss 5.1 with the Metro Web Services stack Concept Draw Office Open Office 3.2 Subversion Client RapidSVN Ode to Microsoft Windows As most any developer who has left the Windows world w...

Singleton vs. Static Class

I'm often asked “Why create a Singleton when a Static Class does the same thing?”.  Well, while using a Singleton vs a Static Class may seem to be the “same thing”, they are quite different.  There are pros and cons to both, and each has it's place in an application.  To understand the difference, let's first take a look at memory allocation.  Then we’ll look at memory implications, state and synchronization, and some caveats as to the use and behavior of the two. Stack and Heap There are two major types of memory allocation within the .Net CLR and Java VM--the stack and the heap.  The stack is just that—an organized stack of frames.  Think of it as a stack of blocks and you can only access the block at the top of the stack—the active frame .  Each thread gets it's own stack.  The heap is a disorganized “pile” of “things” that can be quickly accessed from anywhere in the pile.  Under the hood, .Net and Java handle these memory areas differe...