syndicator
New Server
GeneralJust so everyone's aware, the blog has been moved from an old, bad server to a new, pretty (or so I've been told) server. So if you experience anything out of the ordinary, please let me know. I'm pretty sure I got everyone's comments over, and all the old posts, etc. But things always manage to slip through the cracks (like RSS feeds and other things). The current plan is to also try to upgrade my copy of Movable Type. However, to say that MT migrates data poorly is to understate the situation drastically. ;-) Once the upgrade happens, I'll be sure to let y'all know so that you can flood me with complaints about the new setup.
New Machine
randomSo I got my brand-spanking new desktop machine today (my old one barely lasted two years before it gave up the ghost), and I thought it would be fun to keep track of everything that I do to get a machine all set up "properly" for my needs. Step 1: reformat. I don't care what machine I get, who I get it from, etc. I always reformat it first thing -- this way, I can be sure the machine is setup the way I want it to be with no happy surprises. Today, I booted my new machine once just to see the state of things. I had 20+ desktop icons, and about 15 tray items. The amount of shovelware that gets put onto new machines is outrageous! Step 2: install the OS.
New Machine
randomSo I got my brand-spanking new desktop machine today (my old one barely lasted two years before it gave up the ghost), and I thought it would be fun to keep track of everything that I do to get a machine all set up "properly" for my needs.
Step 1: reformat. I don't care what machine I get, who I get it from, etc. I always reformat it first thing -- this way, I can be sure the machine is setup the way I want it to be with no happy surprises. Today, I booted my new machine once just to see the state of things. I had 20+ desktop icons, and about 15 tray items. The amount of shovelware that gets put onto new machines is outrageous!
REALLoadGlobalMethod doesn't do what you might think
realbasic gemsThis topic came up recently on the forums, and so I figured it might make a bit of sense to discuss what REALLoadGlobalMethod is. It's a plugin SDK function that is part of the dynamic access set of APIs. However, it's also total misnomer, as it's job is not to load up global methods like you might think.
The duty of this API is to load up global framework methods. That's it, and nothing more. It does not, cannot and will not load up anything outside of the select handful of framework functions that we provide. This is a problem because the name of the API certainly doesn't imply that... and the parameter signature of the function exacerbates the issue by providing a parameter to specify what module to load the function from!
REALLoadGlobalMethod doesn't do what you might think
realbasic gemsThis topic came up recently on the forums, and so I figured it might make a bit of sense to discuss what REALLoadGlobalMethod is. It's a plugin SDK function that is part of the dynamic access set of APIs. However, it's also total misnomer, as it's job is not to load up global methods like you might think. The duty of this API is to load up global framework methods. That's it, and nothing more. It does not, cannot and will not load up anything outside of the select handful of framework functions that we provide. This is a problem because the name of the API certainly doesn't imply that...
Little-known datatype fact
realbasic gemsREALbasic used to have some datatypes which were only legal in declares, like CString and PString -- however, in recent history (several releases back, but I forget when), these became first-class datatypes. This means that you can use them outside of the context of declares. However, their use is quite limited outside of declares, so I'd strongly advise against using them as general purpose datatypes. Just use String if you're not going to monkey with declares. That being said, all of the new string datatypes are essentially a type of Ptr. CString is a pointer to a null-terminated, ANSI C string.
Little-known datatype fact
realbasic gemsREALbasic used to have some datatypes which were only legal in declares, like CString and PString -- however, in recent history (several releases back, but I forget when), these became first-class datatypes. This means that you can use them outside of the context of declares. However, their use is quite limited outside of declares, so I'd strongly advise against using them as general purpose datatypes. Just use String if you're not going to monkey with declares.
That being said, all of the new string datatypes are essentially a type of Ptr. CString is a pointer to a null-terminated, ANSI C string. WString is a pointer to a null-terminate ANSI wchar_t string. PString is a pointer to a typical Pascal string (up to 255 characters long). CFStringRef is, crazily enough, a CFStringRef (only useful in Carbon and Cocoa), which is an opaque string pointer. This has an interesting ramification when it comes to declares.
2008r1 Awesome Stuff!
realbasic gemsHere's my list of the awesome things I love about 2008r1, in no particular order:
- Introspection is rather neat. It's not the coolest thing ever, but it certainly has some nice functionality to it. For instance, I can now create COM interface producers with a little more ease by introspecting an object in order to do the vtable hookups. There are some other awesome things you can do with introspection as well, such as serializing an object in an automated fashion. However, until you're able to create an object by name, unserializing is still kind of painful.
- The ability to put anything into a variant, including arrays.
2008r1 Awesome Stuff!
realbasic gemsHere's my list of the awesome things I love about 2008r1, in no particular order:
- Introspection is rather neat. It's not the coolest thing ever, but it certainly has some nice functionality to it. For instance, I can now create COM interface producers with a little more ease by introspecting an object in order to do the vtable hookups. There are some other awesome things you can do with introspection as well, such as serializing an object in an automated fashion. However, until you're able to create an object by name, unserializing is still kind of painful.
- The ability to put anything into a variant, including arrays. Variants used to be handy, but now they down-right rock! This means you can store an array into a dictionary, for instance. So I can finally polish up a really nice preferences class interface!
- This is a little feature, but one I still really enjoy. I have a mouse with extra buttons on it for performing common actions like back and forward. I use these buttons constantly while browsing the web, as well as within Windows Explorer. The IDE used to ignore these buttons, but no longer! I can also use some of the extended keyboard buttons for functionality like search, cut/copy/paste, etc. Very minor, but still a really nice thing.
- A whole bunch of work was done to make Win32 functionality more Unicode-savvy, which is always great. Since RB only supports Win2k and higher, it's about time to see the last vestiges of ANSI support go away and be replaced with Unicode.
- Deprecations and removals! I know that may seem odd to be part of my "awesome stuff" list, but I strongly approve of deprecating functionality which would otherwise be ignored. This opens up the market to 3rd party developers who want to take over and provide that functionality, if it's necessary. It also removes cruft from the RB framework, which is always great.
- There's a new compiler feature that allows you to specify that a method implements a particular interface method explicitly. This is useful if you don't care for a particular interface's nomenclature. For instance, let's say an interface exposes a method called WriteError, but you really don't like that as it doesn't fit with your class' API. You can have the class implement a method called SpiffyError which Implements SomeInterface.WriteError instead. This may not seem too useful now, but it has connotations for the future that are very exciting.
What things do you really like about 2008r1? Any particular feature you absolutely adore? Any bug fix you were excited to see taken care of?
Differentials make a difference!
realbasic gemsA lot of times, reducing a bug report to the simplest possible example isn't quite enough. The thing that really makes the difference between fixing a bug quickly or not is giving information about what works and what doesn't work. Here's a great example that I culled down from a recent bug report.
Dim m As MemoryBlock = NewMemoryBlock( 128*4 ) Dim p As Ptr = m Dim i As Integer = 264 p.Single(i) = p.Single(i) + 2.0 MsgBox Str( p.Single( i ) ) This code would display the value "0" instead of "2", and then crash. However, if you replace every instance of "i" with 264, then the crash would go away.
