Ok, this is a question for all you males out there: what's the best electric razor? I've been trying to find a good way to get myself clean shaven, and have been failing miserably at it for many years. My problem is two-fold: 1) I'm lazy, so I want something quick. Quicker than a straight razor, which is what I use today. 2) I'm a sissy, so I want something that isn't going to tear the hair out of my face. So I presume that at least one or two of you have to be clean and presentable on a
January 2007 Archives
After answering a few prayers on the forums, I realized that there are some features of the IDE which people don't seem to know about. You can hold down Option (on the Mac) or Shift (on Windows and Linux) when double-clicking in the project item editor to open the item up in the alternate editor. So, for instance, if you Shift+Double Click on Window1, the it opens up the source code editor instead of the window editor. If you hold down Ctrl (on Windows and Linux) or Cmd (on the Mac) when double-clicking a word in the code editor, it
I'm one of those people who has a very hard time shutting my brain down at night. Quite often that means the only time I get sleep is once my body is exhausted enough that it just shuts itself down. This weekend was one of those weekends. On Friday, I worked late on some debugger stuff, but ran into a flaw with my design. So Lis and I hung out, had some dinner, etc. Then, about 11pm I realized the solution to my problem. So into the office I went and I pounded my solution out. About 2am was when
Yesterday you saw the questions that gave me a lot of consternation. Hopefully I'm not alone! ;-) However, there are answers to the questions. The first two should be relatively easy. The first question is generally answered with an iterative function where you loop until you encounter a null byte, converting as you go. So the quick way to get an integer value from the string is to subtract '0' from the character (since ASCII values are just single-byte values). So '1' - '0' is the same as 49 - 48 (the ASCII values of '1' and '0'), which is
A few people were very interested to hear what super secret interview question Mars asked me. Being the nice guy that I am, I'll share it with you. But remember, this was being asked after about five hours worth of interviews in one day, and on-the-spot questions are always harder. It was a three part question about how to solve a problem in C. I'll give you the three parts, and tomorrow I'll give you the answers. Background: You are going to write a function which takes a string version of a number and convert it into an integer value.
So here's a cute story which some of you may find amusing. It's the story of how I came to start working for REAL Software. I had been papering the United States with applications for a few weeks, applying for any jobs that looked remotely interesting. I was mainly looking for a Windows programming position which would require Win32 API knowledge and not MFC or VB. On average, I was putting in about a dozen applications a day. Then, one night at around 9pm, I get a phone call from a guy named Geoff wanting to discuss a position at
Ben Harker made a suggestion the other day about a good blogging topic that I thought was interesting. He was wondering what my programming background is and what sort of things got me interested in programming. I first started programming when I was in high school. I used qbasic on the old Windows 3.1 machines we had in the library and used it to write some dinky little text-based games. Then I convinced the school to get a copy of this new, awesome BASIC compiler called QuickBasic. It could actually build stand-alone executables! Oooh! ;-) I taught myself BASIC with
I've been really busy with the debugger at work, getting all sorts of awesomeness done. We haven't even put out the first alpha yet, and I'm already most of the way down my list! Granted, I know full well that there is more work to be done on the items I've already started (UI tweaks, and whatnot). But it's still nice to know that I've gotten a major chunk of functionality out of the way relatively quickly. However, I must admit that I am running out of steam with regards to blog topics. I sat down this afternoon to write
I never knew this before, but here's a handy plugin debugging trick. If you put a DLL file next to the IDE, then the IDE loads it up as a plugin (assuming that it has a PluginEntry function exported). You can use this as a way to help debug your plugins while they're interacting with the IDE. That's pretty neat! The other fun trick I recently learned about was that you can add a separator to the Application menu on the Mac by making a new AppleMenuItem and assigning "-" to its text. Sensible, but I never really thought about
It's been a long last few days, but rather interesting. On Thursday night, Lis and I drove down to Roseville (just outside of St Paul) to a hotel and crashed. Then on Friday morning, I drove her over to the U of M campus (in St Paul) so that she could meet with professors, sit in on classes, etc. While she was off checking out the grad school, I was in the hotel room working. Amazingly, I was able to get a fair amount of work done. I'm still chugging away on various debugger improvements. Friday's fun was making some
Last time we saw how to make the dialog useful by providing a dialog box callback. This time we're going to make a simple change to make the dialog less ugly. Right now it's using the "System" font, which is rather hideous. This is not to be confused with the RB "System" font, which is actually a metafont. Instead, it's using the honest-to-goodness ancient Windows 1.0 system font. Let's make it use the MS Shell Dlg font instead so that it looks a lot more like a typical dialog. To do this, we want to specify the point size and
We're going to take a little break from the current series (don't worry -- we'll get to the last post in the series tomorrow, I promise). You may be interested in what sort of evil things I've been up to lately. Tons of evil things. :: grins :: My job for this release is to work on the debugger, and I've been really enjoying my job lately. I've been looking at areas where the debugger can do a better job of helping the programmer to find bugs. This involves things like displaying more information to the user, viewing information in
Last time we saw the bulk of the fun -- how to put a dialog box onto the screen. Now we're going to extend that to make it useful. The first way we're going to do this is by allowing the user to interact with the dialog. When the user hits the OK button, or the close button (in the upper-right of the window), the dialog should close. But the caller should be able to differentiate between the two operations (in case they care). We're going to accomplish this with our knowledge of shared methods by providing a callback for
Finally! If you've been following along with all of the theoretical posts thus far, I bet you're wondering if I was ever going to get to the point. ;-) Now we're going to put together everything we've learned about Ptrs and Structures and whatnot to get some real work done. To refresh your memories, what we're trying to accomplish is putting a simple dialog box on the screen using only the Win32 APIs to do it. This involves making some dialog templates in memory, and calling DialogBoxIndirect. For starters, we're going to define the two structures that this API relies
Chugging right along, we're almost ready to dive in to our real project itself! The last REALbasic theory topic I want to cover before we tackle the real problem at hand is shared methods. If you look at the declare we're focusing on (DialogBoxIndirect), you'll notice that one of the parameters it takes is a DLOGPROC, which is a callback function used to communicate what's happening in the dialog box itself. For instance, if a user clicks on a button, you'll get a WM_COMMAND message telling you about it. Things of that nature are the backbone for firing off events
Continuing right along from our previous post, we're going to talk about structures today. Structures are another new-ish addition to the REALbasic language. They are datatypes which define a set of other datatypes. Sounds scary, eh? It's not -- I promise. You can think of a structure as being a "dumbed-down" kind of class. Classes can contain all sorts of cool things like methods and constants and properties. A structure is more like a class that contains only public properties. You can't put any methods or constants, etc onto a structure. And all of its members are public. That's why
Last time we discussed the basic idea behind our project. Today we're going to start to get our hands dirty by covering the basic ideas behind the Ptr datatype. The Ptr data type is used to hold a pointer. For those of you with a C/C++ background, pointers are old-hat. But for anyone who's never had to work with these buggers, here's a bit of education for you. Everything in programming boils down to two different storage mechanisms: value and reference (pointer). A value the data itself. If I say i = 5, then i's value is 5 and somewhere
Welcome to the start of a multi-post topic on some rather new features to REALbasic. I happened to come across a user who was attempting to do some fairly complex Win32 declares, and in the course of trying to tackle the problem myself, I realized that I was making use of some new language features that would be nice to share with others. Before we jump right into all of the goodies, you're going to need a bit of background information on what we're trying to accomplish. We're going to work on a low-level API for creating dialog boxes in
I have some very exciting news which no one here cares about (probably): the basement is finally primed! :-) I spent almost all day yesterday getting the basement worked on while Lis spent the day unpacking tons of her stuff and putting it away. The house is beginning to look like a home again, finally. Lis still has a bit of unpacking left to do, which she'll hopefully take care of this week. And tomorrow afternoon, we're heading out to Avon for a while to look at carpet, doors and trim for the basement. Once we figure out what colors
Well, it's about damned time, right? I finally sold my Dodge -- that only took a few months to do. A nice kid named Kelly called me up the other night and asked a bunch of questions about the truck. After answering them, he asked if he could take it for a test drive, so we met at the local gas station and he took it for a spin. The next morning he paid me 2700$ in cash for it (which is less than I wanted, but it's still cash and it's more than I had before). I'm really happy
For those of you who really enjoy the pain of weak-linking against WinSock, here's another gotcha to watch out for. We use getaddrinfo as a way to do DNS address lookups from IP addresses. This is a very standard function across any POSIX implementation. Well, except for Windows, in which it only lives in Windows XP and up. If you care to support Windows 2000 or below, you actually have a ton of hoops to jump through. Now, I will grant the WinSock team this -- they at least made an effort to help people out with backwards compatibility. If
Now that 2007r1 is out, I can talk about another awesome change which I'm really excited for. This time it's a debugger feature (one which Mars and I worked on together). In previous versions of REALbasic, when you would "drill down" into a variable in the viewer (such as clicking on an object link to view its properties), the act of stepping would cause the view to change back to the local variables. So if you wanted to watch the state of an object's properties while stepping, it was very painful (unless you opened the object up in its own
You may have noticed by now that REALbasic 2007 release 1 was released yesterday morning. There are some really cool things in this release, but the one that I'm most excited about is a relatively small thing: new bitwise operators. That's right, I said "operators" -- not methods. This means you can finally do bitwise operations at the assembly level, instead of incurring method call overhead for doing them. The new operators are: And, Or, Xor and Not (crazy names, eh?) and you'd use them exactly how you'd expect. Foo And Bar, Not Wahoo And (Yippee XOr Kiyay), etc. And
Yup, that's right -- finally on the new servers I've been talking about for so long. With the gracious assistance of Adam from babbage-tech, we got the sites up and running tonight with relatively little problems. If you notice some bugs, please report them here. There are some known issues, however: 1) The main page shows 0 comments for all old posts, but the comments really are there. 2) The old [rbcode] tags show up and code isn't formatted as expected. This will hopefully change once we get a good syntax highlighting plugin for MT. So let me know what
This should be interesting, eh? Elissa and I got engaged at Ink's Lake in Texas. That's a pretty big ticket item for this year. I bought a new (to me) truck from grandpa, and still haven't sold the old one. Yeesh! I had my one year anniversary of living in my house. I started working on finishing off my basement. Elissa and her cat Miikka moved in with me. I spent my first Christmas away from family. I learned tons of new things about the internals of REALbasic; from plugins to the debugger and plenty in between. I ate sushi