October 2008 Archives

Long-time REALbasic user, Steve Garman, asked via the Suggest Box what three things would I change if I could do them all over again? That's a really tough question! As a programmer, I firmly believe everything could be done better the second or third time around. It's true for your code, it's true for my code, it's true for everyone's code (well, except maybe Donald Knuth). Since REALbasic is really made of up three separate products (the compiler, the framework, and the IDE), it's even harder to pick what to redo. So I'm going to cheat and try to pick

PDC Day Three

| | Comments (3)
I decided to sleep in today and skip the keynote, so I honestly have no idea what was talked about there. But after the last two keynotes, I'm sure it was interesting but would leave me with a sore behind from sitting for so long! :-P Instead, I had a casual morning which is exactly what the doctor ordered. I'm waiting for the first session of the day to start, which is actually going to be a panel on the future of language design. It's got a lot of big names on the list of speakers, so it's going to

PDC Day Two

| | Comments (0)
Another day, another keynote. Herded like cattle again, but today I managed to snag a seat towards the back. Little know fact about me: I dislike crowded rooms. Yay for an aisle seat with an escape route! :-P I suspect that today is going to be all about Windows 7, since that seems to be the focus of the talks all day. Interesting innovations in terms of browsing running apps, documents, etc in the taskbar. Visually, not drastically different from Vista -- some changes, but nothing scary so far. Everything is about usability thus far, and I've not seen any

PDC Day One

| | Comments (1)
The bus ride over was a blast. Our driver was your typical form of crazy for LA: honking at people, telling them to "get their ass in gear" as they got on the bus, and closing doors on stragglers. We had to pick up four hotel's worth of people, and I think the trip still took under 10 minutes. LoL, crazy! Registration was a breeze; took less than 10 minute, even with about 10k other people registering at the same time. I forgot just how huge the Staples Center is, it's like a small city! Since my Gateway died a
Sounds kind of weird, I'll admit, but it's true. 99% of you should never call FolderItem.IsReadable or IsWriteable, and honestly, I think the API probably should have not been implemented in the first place (or should have been implemented under a different name). The theory behind these APIs gets confused by the unfortunate nomenclature use. The names suggest "if I were to try to open this up for reading or writing, would it work?", but that's the wrong way to look at it. These APIs are meant for people writing file browsers which display little locks next to the icons
I'm quite excited because it's getting to be that time of the year again: PDC time! I'm going to be gone the last week of Oct, hanging out with all the great minds from Microsoft. I'll try to do some blogging from the conference, but if you don't here from me next week, you'll understand why. ;-) If any of you are also going to be at PDC and are interested in meeting up, let me know! Maybe we can have a Birds of a Feather somewhere (or at the very least, drink some beer and talk shop).
While pondering how classes within classes work, I was struck by the fact that I really needed to solidify my ideas of what scope's purpose is in REALbasic. Thus far, it's been a pretty straight-forward concept, but with the advent of namespaces has become a bit more blurry. Let's start with some purely hypothetical example code: Class Outer Private Class Inner Sub Wahoo() MsgBox "Wahoo!" End Sub End Class Function Foobar() as Inner return new Inner End Function End Class The interesting question here is: what's this mean? Outer.Foobar returns an instance of Outer.Inner -- the static type of the

BitwiseAnd Crashes? Naww!!

| | Comments (5)
So we've been getting some really "goofy" reports since r4 about how BitwiseAnd is causing crashes for some people (as is Bitwise.BitAnd), only on Windows. What's truly odd about this is that nothing has changed in those functions for a long time (we're talking several years). So what the heck could be different? I knew the actual bug people were reporting was just a red herring, and that there was a more insidious underlying issue. After a fair amount of digging, I managed to get an important clue: some users were getting an "illegal instruction" crash. This is a crash
One of the concepts I've been mulling over lately is to round out the "types within classes" functionality that was added to 2008r3. That release allowed you to put type declarations into a class in much the same way as you're able to for modules. However, the declarations had some notable absences. Namely: classes, interfaces and external methods. External methods have their own reasons for not being included, and I won't be covering them here. However, classes within classes and interfaces within classes are what I want to discuss here. As usual, this is just me mulling ideas out --

Interesting? Or not!

| | Comments (20)
I just finished writing up a pretty long post about the theoretical idea of classes within classes, and what their behaviors would be, why I came to the design decisions I did, what my design goals are, etc. Then I asked myself, "does anyone outside of me and a very select few others actually care?" So the post is now on the back-burner. I've noticed I've been getting suggestions to stop being so high-browed about my blog topics, so that leads me to wonder whether anyone actually cares to see super-technical crap about the compiler. It's obviously a topic that's
While looking more in-depth at a recent bug report, I realized that we have a fundamental flaw in the way the Ptr magic namespace works. I'm talking about the way that you're able to easily peek and poke values with a Ptr via a magic dataype name. The idea is an honorable one in that it fits nicely with the "easy to use, but still powerful" mantra that REALbasic follows. But due to the left-associative nature of the dot operator, this concept has some flaws. Consider the following snippet of code: Dim p as Ptr = SomethingThatReturnsAPtr() p.Int32 = 21
An interesting question about Introspection came up recently that I thought would make a great discussion topic for my blog. What is a "primitive" type, and what is a "value" type? These questions are basically theoretical in nature and won't have too much of an impact on how you deal with Introspection. However, understanding the answers may help you if you're delving deep. We'll start with value types, since they have an easier explanation. If you've read my previous discussion, then you'll understand that something passed ByRef can be mutated by the caller and those changes will be reflected back

Cascading Simple Bugs!

| | Comments (9)
Today was one of those days... I happened to notice a silly little issue with the compiler a few weeks ago that I wanted to tackle: you can have a class and a module with the same name at the same namespace level and the compiler won't flag it as an error. Seems like a small bug, especially given the fact that modern incarnations of the IDE won't allow you to get into this state. However, since older IDEs seemed to have allowed it at one point, and RBScript has no way to prevent it, I wanted to make an
The Analyze Project command (and its sibling, Analyze Item) is a relatively new piece of functionality which has taken over the old "Check Project for Errors" functionality. It continues to check your projects for errors, but packs an extra punch. Some people (myself included) erroneously refer to it as a "warning system" because that's what it appears to do. 2008r4 continues with this trend by showing you some very common warnings that will feel familiar to you if you've come from other languages. However, as I said, it's not correct to think of it as strictly a warning system. It

Blogroll

Friends
REALbasic Related
Win32 Programming