KIS Systems, Inc - Contract Programming for Unix/Windows/Web in C++/C#/PHP/Qt/.NET and other technologies.

KIS Technoblog

Technical ruminations from our chief codemeister – Rick Berger

Archive for October, 2007

Mac Saga, Continued…

Posted by rickb on 24th October 2007

I am now the less-than-proud owner of a dead MacBook

Things started innocently enough – I ordered a larger drive for the MacBook. First order of business was to transfer the data from the old HD to the new. To effect this, I put it (the new HD) in a USB casing and then used ‘Disk Utility’ to copy over the main disk.

[This, in and of itself, turned out to be a more major ordeal than I'd expected. I got Carbon Copy to transfer the data, but in perusing the documentation, I realized it needs both disks to be unmounted to work in block mode. Block mode would preserve absolutely everything on the original disk, so the presumption is that's the proper way to go.

But it's not possible on a single Mac (think about it - you'll get it.)

Next attempt: I'd heard that the Disk Utility provided a capability through it's imaging and 'restore' mechanism. That's could work - I had an extra USB drive. I could boot up using the install DVD, insuring the HD wasn't disturbed in any way, create an image on the other USB, and then restore it to the new drive in the other USB housing.

It took hours, of course. And then failed with an 'Error -39'. End-of-file- overrun error.

Fine. Do a repair on both disks and try again.

Failed, again.

So, I rebooted from the old HD and then tried 'restore' again, this time just dragging and dropping the mount points for source and destination. Lo and behold, that seemed to work. I confirmed it by booting off the USB - yes it booted. It would be nice in the documentation somewhere to indicate that you can, in fact, do this from a live mount and the resulting disk will be bootable. I would have liked to have avoided the four hours' efforts in other directions.]

Next, it’s time to replace the disk.
Pulled the battery, pulled the little ‘L’ bracket, pulled out the old HD. No problems, thus far.

But, trying to insert the new HD, I felt a lot of internal resistance. Pulled and looked, reseated. I dunno. Try to boot.

No luck – doesn’t see the disk.

Pulled the new disk, re-installed the old disk – same resistance problem. And, the system doesn’t see the disk on boot.

Well. This is a conundrum. I looked as deeply into the bay as I could and couldn’t see anything wrong. Tried with both disks again, and again – same result. Tried booting off the USB – no problem.

Hm. I guess I could do that, but it’s certainly not an optimal solution. What now?

Into the Case

The only way I was going to figure out what the problem was – (obstructed or even broken SATA slot?) – was to split the case. Ok, the machine’s out of warranty, anyway, and I’ve had positive experiences opening up machines, twiddling them, and getting them back together, before. I’m miles and a full day away from any Mac support. So, out come the jeweler’s screwdrivers.

After perusing a site that showed step-by-step instructions on splitting the MacBook case, I started pulling screws – a million of them, it seemed. All teeny-tiny. It took some effort, but I finally got it to split. And, there was the problem: some piece of (black – hence the visibility issue) rubber padding had worked loose and was obstructing the bay and the SATA slot.

I cleared it, put the case back together, and …

MacBook dead. Some failed attempts to reboot, but ultimately (without relating a two hour saga of trying to resuscitate it) … dead.

Now, there really is only one thing left to do: I got on Apple’s website and ordered a new MacBook – stripped, so I can upgrade the memory and HD, myself.

In the interim, I’m working on my old HP tablet, that has been a solid brick since day one.

The Conclusion

Save an early Sony Viao, I’ve never had as much trouble with any notebooks as I have the Macs. For ten cents, I’d pitch the whole effort and get a Toshiba. After a good ten hours of work, the result is a dead MacBook, and a further $1200 expenditure I don’t really need , right now.

But, I’m committed. The 3+ OS capability is too attractive, the design really is good for the weight and format. Maybe that’s the price you pay for edge-y design.

Still. Splitting the case shouldn’t have been a breaker. The HD padding shouldn’t have been an issue. The earlier problems with the dreaded ‘Random Shutdown Syndrome’ shouldn’t have happened. Nor, for that matter, should have my black Wall Street have died simply from sitting on the shelf.

“It Just Works” is great marketing copy.

Thus far, for me, it hasn’t been the case.

Posted in Mac, MacIntosh | No Comments »

Just When I Thought Things Were Fine…

Posted by rickb on 22nd October 2007

While constructing the previous post, I noticed a number of things I didn’t like, particularly in the list editing – the lists are cramped together, the lineheights aren’t right, and there’s no way to ‘paragraph off’ a list, like so:

  • This is a list item.
  • This is a continuing thought within the list item.
  • This is another list item.

Notice the break in the continuing item. That’s achieved with a special list item (using <br/> is crude – hard to style.)

If you specify a css rule for a continuing list item like so:

li.continue { list-style:none; margin-top:0.4em!important; }

you can define a ‘continuing list paragraph’. Problem is, when WordPress sees such a thing, it strips it out.

So, I’ve had to crawl through the code and figure out what the heck is going on. Way down deep inside, there’s a file that lists ‘allowedposttags’ – an array of arrays following canonical rules. A bit of a hack, and I’ve got <li> behaving the way I want.

Just have to save off the changes in case of upgrade.

Another thing I like is a stand-off paragraph – something to introduce a new thought in the text, without having to use something like a header. That’s how this paragraph is defined. Again, another class description:

p.class  { padding-top:2.0em; }

Or some such thing, and now I have a stand-off paragraph.

As usual, packages are great – they get things going. But, to get what you want, you have to dig inside of them and control them by the tail. WordPress is no different.

Posted in PHP, Programming, css, software, wordpress | No Comments »

Let Chaos Reign!!

Posted by rickb on 22nd October 2007

Ok, I’ve got about ten things going at once, here. I’m the incarnation of Andy Grove’s pre-commitment exploration dictum: Let Chaos Reign!! Of course, the other side of that dictum is that when you’re committed to a particular direction, you apply the inverse: Reign Chaos In!!.

Well, it keeps me from getting bored between gigs, anyway.

The top four things (as of the moment) are:

  1. Getting the Zend IDE up and running for PHP. Ostensibly, this would seem to be simple, but things are complicated by virtue of the fact that Zend has created a second IDE based on Eclipse. Eclipse is a good thing – it not only supports PHP, but HTML, CSS, XML, and the rest of the alphabet soup of net languages, for development on the net. But, it supports application development languages, as well, most notably C++ and Java.
  2. Assiduously avoiding Java (don’t like things that consume half the machine’s resources to run a ‘hello world’ program), but C++ is right in there.
  3. Ubuntu VM configuration. Ok, I like ubuntu bunches. I hate to say it’s almost ‘Windows-like’ in ease of use, but it is. It has what must be the best update manager in the open-source world – it really does ‘just work’.
  4. Qyoto investigations: C# and Qt – what I think may emerge as the best cross-platform agile development environment, ever. C# has all the advantages of Java, without the overhead penalties. Qt is the best cross-platform windowing environment, albeit the cost is almost usurious, at least for small developers. Maybe in the future there would be a wxSharp effort? Not sure how that would work with wxWidget’s message map architecture…
  5. I’ve put this up under monodevelop on the ubuntu system, but it’s not working (even though monodevelop says it is. Just copies down the reference .dll’s.Real anxious to get this working on as many platforms as I can.
  6. Getting the WordPress rss feed plugin working. That’s the last piece of this blog. It’s installed, it’s recognized, I can set things up, but it doesn’t output anything.
  7. Getting that done will finish up the blogging system.

It sounds like a lot, and it is, but it interleaves – a lot of these are embryonic efforts (especially Qyoto) and they require some feedback from forum query’s before I can continue. So, I can drop one while waiting for a response and pick up another. Or pick up the other when I get a neuron spark.

Posted in C++, CSharp, Linux, Mac, PHP, Platforms, Programming, Qt, Virtual Machine Software, software | No Comments »

Back to PHP-land – Zend Environment

Posted by rickb on 18th October 2007

Enough playing around with the Ubuntu installation – I have to fix up a website.

PHP has been great for coding up web apps and even general website stuff. Debugging has been a bit wanky, though – up to now, my methodology has been to include a ‘debug’ class, sprinkle a few statements around (glorified print statements), and then remove them when it’s done. By removing the easily identifiable debug include (do a global search on the .php files), the various debug statements come up unresolved and I can insure they don’t dangle around in the production site.

Honestly, since there’s no heavy compilation step, doing this sort of thing in PHP is blindingly fast – make an edit, refresh the page, and you see the change, instantly.

But, you have to modify the code – sometimes extensively to get down to the problem – and then you have to re-modify it back to where it was minus the bug, once you have the fix.  It’s also a bit tough to do hidden form-response pages, and the like.

A real debugging environment would eliminate those issues.

Zend IDE

So, I popped for the Zend Pro IDE — the pro version supports remote debugging (which I think is essential vs. local. Pages may or may not behave correctly in a local installation, especially on Windows (where the IDE has to reside.) That’s why I put up a developer server – it’s a very close mirror of the production server. Thus, I want to debug on the development server.)

Obviously I use IDE’s for other development environments, but the fact is the edit and turnaround cycle for PHP has been so fast, I’ve put it off, for a long time. Now that I’ve decided to bite off the effort and cost, I’m finding it’s a bit of a hassle to set up, especially for virtual hosts.

Hopefully, it will be worth the effort and cost, once it’s up.

Posted in PHP, Programming, Web Development, server, software | No Comments »

Ubuntu in Parallels

Posted by rickb on 17th October 2007

It took a couple of runs, but I got Ubuntu (the ‘K’ version) up and running under Parallels on the Mac. So, I’ve got four environments on a single machine. Basically good, but I can only run two VM’s at a time, it seems. Too much memory whack trying to run all three. I’ll have to play with memory tweaks to see if I can get three VM’s to play together. Windows just requires a bunch, so launching that VM means taking up a third of the machine’s resources.

The Rationale

Several, really – one, I’m a command-line junkie, and KDE’s command window is simply the best – a tabbed version that allows grouping of several command windows together. This is a good thing, since I will often have six or more command windows open on two or three different machines/servers at a time. Tabbing them in logical groups keeps the desktop clutter down.

Secondly, I want all three environments for cross-platform development testing. A lot of the new development platforms are coming up under open source – eclipse, Qyoto, Qt, Ruby (on Rails), PHP, etc., etc. Linux is the place to hammer those out, and Ubuntu is the easiest of the bunch to install and keep updated.

(Aside: Parallels on the Mac is in version 3, and seems to have improved, for the most part.  There are the usual gripes in the forums from the usual cranks, but on the whole, it seems to be working well.  Also: version 3 adds 3d support to the Windows VM, an important consideration for a 3d graphics software developer. )

Now, I need to hook up four screens…

Next investigation is automating the .rss feeds from WordPress.

Posted in Linux, Open Source, Programming, Virtual Machine Software | No Comments »

If You Want It Done Right…

Posted by rickb on 15th October 2007

So, there I was – happily using the Google Blogger to keep things on my site, and keep me from having to install yet another piece of software on my server. It was all working fine, until Google’s Blogger facility to host the pages here (to drive the search engines) broke.

And, gathering from comments from others who were experiencing the same problem, Google did not appear to be inclined to fix it – at least not anytime soon.

What’s a diehard techie with a penchant for wordsmithing to do?

Install my own, of course. Thus, a subsequent installation of WordPress to this site, importing the Blogger version into it via the .rss feed, a bit of server redirection to go from the old file-based to the new database-based format (and new sub-domain to serve it), and lo and off – we’re running again with a self hosted blogging system.

Of course, I need to activate the .rss feed stuff, activate tags, get the keywords right, and do something about this theme…

It never ends.

Update: 16-Oct

Voila!

WordPress is up and running, blogs are transported over, a reasonable theme is selected, and overall, things look pretty reasonable. This is the ‘mu’ (multi-user) version of WordPress – I chose it in the event I want to put other blogs up for various domains on the server (I have several.) It’s a bit wanky, but I can make it do what I want.

Only issue left is the pic – it’s a bit scruffy looking. have to clean that up, a bit.

Onward…

Update II: 18-Oct

Chose a different them – no picture issue, after all. I like this one, a lot. It still took some tweaking, but it’s a nice, semi-formal techie look. And there’s room on the side for something or other…

rickb

Posted in blog, server, software, wordpress | No Comments »