Flotsam and Jetsam #98

  • I’ve been whining about my difficulty in writing a book chapter about the Parallel Programming Library.  I’m getting the hang of it, though, and it is as cool as it’s been touted to be.  In fact, I’d venture to say that once you start using it, you’ll never really need to use TThread again.  The PPL is a nice abstraction of threading, with the notion of a TTask/ITask taking over the role of TThread.  You can pretty much parallelize anything you want with ease.  Very much worth the upgrade, if you are still on a pre-XE7 version.  And completely cross-platform – with nary an {$IFDEF} to be found. 
  • As many of you know, I work on my book at my local Burger King on Saturday and Sunday mornings.  As a result, I drink a lot of iced tea.  This is fine – I enjoy a good caffeine buzz – but the down side?  All that iced tea makes me cold, despite the fact that I have a heavy fleece jacket on most of the time.   And the iced tea in the container is warm, so you have to use a lot of ice to get it cold, because no one wants warm iced tea.  I wonder if I could give myself hypothermia.  I mean, I drink a lot of iced tea while I’m writing, and I am definitely lowering my body temperature.
  • Here’s a wish that I have for Delphi:  That the default behavior for many of the VCL components be changed to not include the caption in the initial component.  Does anyone want the TPanel caption to be anything other than blank?  Does anyone want “Memo1” in a TMemo? “Edit1” in an edit?  Maybe there was a time for that, but how tough can it be to change that and save us all the aggravation?  VCL team – make this happen!
  • I get the sense that Delphi folks don’t make use of environmental variables like they should. Am I right?  When I find a new library that I want to use, I put it in a directory called c:\code.  For instance, I have c:\code\duckduckdelphi.  Then, I create an environmental variable called “DUCK” that equals the source directory for DuckDuckDelphi.  Then I add $(DUCK) to my Delphi path.  That way, it keeps the path short and sweet and less awkward than a hard-coded path.  In team environments, this works great too, because then people don’t all have to have exactly the same directory structures.  Do others do this?  How do you guys handle your Delphi paths?

Flotsam and Jetsam #97

  • Well, the next release of Delphi must be getting close.  The Delphi Insider has information about Skill Sprints that will show some of the new features.  Mitov Software has an interesting screen shot that looks like it has some sort of multi-view for mobile apps.  Cool.  Here’s a community post on what it is – the Multi-device Preview.  The Code Sprint are showing off new features as well.  Marco has a video about EMS Notifications.  EMS is a very under-appreciated feature if you ask me. 
  • I endeavor to write clean code. I hope you do, too.  One nice measure of that the Embarcadero has given us is “Can Castalia properly parse your code?”.  I submit the following statement:  If Castalia has trouble parsing your code, then the first place you should look to solve the problem is in your code. Code that gives Castalia – which has a pretty good parser – a hard time is maybe just a touch over complicated or not well formatted.  Just a thought. Just my personal thought.
  • Yesterday I attended the Philly.Net Code Camp.  There were at least 500 people there, including a larger percentage of women than I’ve seen before – or at least it seemed that way to me.  I spent the entire day in the same room on the “Scripting” track, learning about node.js,  “this” in Javascript, more about what TypeScript is, and what is coming in ECMAScript 6.  It was a good time and I learned a lot.  These events occur twice a year, and the Philly.net crew do an amazing job putting the event together.  Did I mention that these events  are totally free?  I’ve spoken at the event in the past, mostly on non-technical topics.  I’ll try to do that for the next one.  In any event, it was a good event.  If you are in the area (people came from as far as New York), I’d recommend it. 
  • I’m plugging away on my next book.  Two areas that are giving me – ahem – “challenges” are the Parallel Library and MVVM.  Coming up with good examples leads the difficulty.  Just getting my head around all the stuff in the Parallel Library is proving difficult, I must confess.  I don’t want to do any code with Sleep in it, so finding a good example of code that take up time is hard.  MVVM is proving difficult to find a good example using LIve Bindings, and actually doing the “true” MVVM way as defined by Rob Eisenberg. I also have to get this chapter past Stefan Glienke, too. Hehe.   In any event, I promise by the time I publish, you’ll have a good solid chapter or two on those subjects that will make you smarter for reading them. 
  • As I mentioned above, I’d like to learn Typescript, mainly because you can apparently not have to learn many of the vagaries of Javascript while being able to achieve the same result.  However, Amazon seems a little thin on books. Anyone got any good resources for Typescript?  I found some good resources for node.js, the avenue that I want to approach Javascript from, but the resources on Typescript are a bit lacking.