. .

news

Corporate Mismanagement

October 26, 2011 13:18:52.185

I have to say, I'm not surprised by the news that the head of McKinsey was engaged in unethical behavior. Not because of anything I know about that company; rather, because of what I saw years ago at ParcPlace. Here's what Walter Russel Mead has to say, in part:

That a criminal could win the trust of so many of the ‘best and the brightest’ in philanthropy and business chillingly demonstrates the moral and intellectual vacuum in the corporate world. Years of excessive payment for executives, okayed by go along to get along boards of directors, a culture of entitlement and a lack of personal character and strong moral codes have created a dead zone at the core of American life.

That took me back. Recall PPS back in the mid 90's, spiraling down under the management of Bill Lyons. His leadership was clearly flawed; he deserved a swift boot out with something along the lines of "and don't let the door hit you on the way out". However - that's not how it worked out.

He, like many execs, had a golden parachute. I don't recall the number now, but when he left - failure in his wake - he took a tidy sum with him. At the very least, that represented a complete failure on the part of the board. He was hardly the only guy to walk from a failure with a huge check; such golden parachutes are common. At the upper ranks, it's quite common for failure to be well rewarded.

But why? Why do boards do such things? Because it's not their money, and everyone is pals, I guess. Something is very rotten in the way a lot of boards and executive suites work together when failure is so regularly rewarded.

Technorati Tags:

posted by James Robertson

 Share Tweet This

st4u

ST 4U 150: Exception Handling in VA Smalltalk

October 26, 2011 10:15:12.086

Today's Smalltalk 4 You looks at error handling in VA Smalltalk. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

Error Handling.

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:


Today we'll look at error handling in VA Smalltalk - the ANS exception system, and the older, instance based signal mechanism. First, let's look at a few simple examples, using divide by zero as the source of our error:


"simple exception handling"
[10 / 0]
   on: ZeroDivide
   do: [:ex | Transcript cr.
   Transcript show: ('Error: <', ex printString, '>'); cr]. 

When the code in the block throws the exception we are looking for, the handle block executes, printing to the Transcript. You can query the exception for details as well:


"simple description"
[10 / 0]
   on: ZeroDivide
   do: [:ex | Transcript cr.
   Transcript show: ('Error: <', ex description, '>'); cr]. 		

You can also resume the exception (assuming it's resumable - you need to look at the implementation of #isResumable for the exception in question):



"just resume"
[10 / 0]
	on: ZeroDivide
	do: [:ex | ex resume].
Transcript show: 'Resumed'; cr.

That will continue past the exception as if nothing happened. Probably not the best handling in most circumstances, but it's something you can do which comes in handy on occasion. One thing to be aware of in VA Smalltalk; not all of the ANSI spec for exceptions has been implemented. #retryUsing: does not work in VA:


"retry - not implemented"
[10 / 0]
	on: ZeroDivide
	do: [:ex | ex retryUsing: [10 / 2]]

Will yield this exception:

Retry

This will only come up if you are porting code from another Smalltalk (Pharo or VW, for instance) - when writing native VA code, this isn't really a problem. The older Signal (instance based) exception mechanism still exists in VA, and is heavily used in the libraries. Using that looks like this:


"Signal based"
[10 / 0]
	when: ExError
	do: [:signal | signal exitWith: nil]

For the most part, handlers using #when:do: will look like that, although you can, of course, customize the do block.

Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.

Technorati Tags: , , ,

Enclosures:
[st4u150-iPhone.m4v ( Size: 6548434 )]

posted by James Robertson

 Share Tweet This

smalltalk

Why Smalltalks 2011?

October 26, 2011 7:58:33.862

Hernan Wilkinson explains why you should consider attending Smalltalks 2011, in an email to various Smalltalk lists:

To begin with, this conference isn’t only about a programming language, it’s about a technology and a development culture which still has a wide influence on our profession. For example, last year Gilad Bracha came to the conference. Who is Gilad Bracha? Maybe the name rings a bell... well, that’s because he’s one of the people behind Dart, Google’s new language (http://www.dartlang.org/). And what does that have to do with Smalltalk? Precisely: Gilad Bracha was one of the creators of Strongtalk (http://www.strongtalk.org/), the fastest Samlltalk at that time, which used adaptive compilation, Polimorphic Inline Caching (PIC), optional variable typing, etc. - all of which are being implemented now in Dart. This year one of his closest collaborators will visit us, Vassili Bykov, who implemented the UI of Newspeak, the latest language he has been working on.

Technorati Tags:

posted by James Robertson

 Share Tweet This

js4u

JS 4U 102: scrollLeft()

October 25, 2011 11:14:35.554

Javascript 4 U

Today's Javascript 4 Youlooks at the JQuery scrollLeft() function. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.

Join the Facebook Group to discuss the tutorials. You can view the archives here.

To watch now, click on the image below:

scrollLeft()

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , ,

Enclosures:
[js4u102-iPhone.m4v ( Size: 2648941 )]

posted by James Robertson

 Share Tweet This

windows

On Running as Admin in Windows

October 24, 2011 17:32:50.000

There's no doubt that Windows 7 is an improvement over Windows XP; there is some doubt (at least in my mind) as to how far MS has gone in the "don't run as Admin" direction.

Why do I say that? Well, I use a Windows VM for playing games on my Mac when I travel. I went back to Mass Effect (I played that and ME 2 on the Xbox; I wanted a playthrough on Steam before ME 3 comes out). Anyway - it kept crashing on load screens in my XP VM. So I tried it in Windows 7. One long download later... it crashed on startup.

Which is where I went to the all powerful Google and discovered that the answer was... run Steam as Admin. The more things change....

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

st4u

ST 4U 149: Parameterized Statements in VA Smalltalk

October 24, 2011 10:04:59.523

Today's Smalltalk 4 You looks at parameterized queries against a database using VA Smalltalk. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

Parameterized Access.

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:


Today we'll look at parameterized queries against a relational database using VA Smalltalk - to see how to connect, please go back to this tutorial, as we are building on it here. As you probably expect, you'll need to set up a connection, and then a mapping dictionary:


"Example - insertFromScript - parameter markers"
queryStatement := 'INSERT INTO PEOPLE (NAME, STREET,CITY,STATE,ZIPCODE,PHONE) VALUES (:PNAME, :PSTREET,:PCITY,:PSTATE,:PZIPCODE,:PPHONE)'.
qSpec := AbtQuerySpec new
statement: queryStatement;
yourself.
dict := Dictionary new.
dict
	at: 'PNAME'  put: 'Fred Flintstone';
	at: 'PSTREET'  put: 'Paleozoic Way';
	at: 'PCITY'  put: 'Rubble City';
	at: 'PSTATE'  put: 'AN';
	at: 'PZIPCODE' put: 23456;
	at: 'PPHONE' put: '890-123-4567'.


If you think about that for a moment, it will become clear how easy it would be to set up a "mini framework" that maps simple objects to database tables; we have one that follows this pattern (using VisualWorks, but it's the same idea) where I work. Make sure you commit the statement:


"commit it"
connection commitUnitOfWork.

Next, look at the two screen captures - we have a query before the code above ran, and then another one after it:

Table before

Table after

Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.

Technorati Tags: , ,

Enclosures:
[st4u149-iPhone.m4v ( Size: 4230679 )]

posted by James Robertson

 Share Tweet This

smalltalk

How to Build a Browser

October 24, 2011 8:36:26.930

Glamour makes it pretty easy - watch the video, and follow the link for the code.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

general

Why Do Modern Buildings Look Awful?

October 23, 2011 19:43:15.363

It seems that in a very real way, many architects see the world differently than the rest of us do:

There are many such confirming studies. For example, Gifford et al. (2002) surveyed other research and noted that “architects did not merely disagree with laypersons about the aesthetic qualities of buildings, they were unable to predict how laypersons would assess buildings, even when they were explicitly asked to do so.” The researchers traced this disagreement to well-known cognitive differences in the two populations: “Evidence that certain cognitive properties are related to building preference [was] found.”

I wonder if this has now reached the self selection stage where the problem is reinforcing itself....

Technorati Tags:

posted by James Robertson

 Share Tweet This

podcastAAC

IM 51: The Pharo Roadmap (AAC)

October 23, 2011 14:16:58.975

Welcome to episode 51 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson, Michael Lucas-Smith, and David Buck.

This week we have a presentation from ESUG 2011: Marcus Denker presenting the roadmap for Pharo. If you would like to see the slides used in the talk, they are available here. If you would rather watch the video, you can get that here.

You can subscribe to the podcast in iTunes (or any other podcatching software) using this feed directly or in iTunes with this one.

To listen now, you can either download the mp3 edition, or the AAC edition. The AAC edition comes with chapter markers. You can subscribe to either edition of the podcast directly in iTunes; just search for Smalltalk and look in the Podcast results. You can subscribe to the mp3 edition directly using this feed, or the AAC edition using this feed using any podcatching software. You can also download the podcast in ogg format.

If you like the music we use, please visit Josh Woodward's site. We use the song Troublemaker for our intro/outro music. I'm sure he'd appreciate your support!

If you have feedback, send it to jarober@gmail.com - or visit us on Facebook - you can subscribe in iTunes using this iTunes enabled feed.. If you enjoy the podcast, pass the word - we would love to have more people hear about Smalltalk!

Technorati Tags: , ,

Enclosures:
[im51.m4a ( Size: 10485934 )]

posted by James Robertson

 Share Tweet This

podcast

IM 51: The Pharo Roadmap

October 23, 2011 14:16:33.125

Welcome to episode 51 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson, Michael Lucas-Smith, and David Buck.

This week we have a presentation from ESUG 2011: Marcus Denker presenting the roadmap for Pharo. If you would like to see the slides used in the talk, they are available here. If you would rather watch the video, you can get that here.

You can subscribe to the podcast in iTunes (or any other podcatching software) using this feed directly or in iTunes with this one.

To listen now, you can either download the mp3 edition, or the AAC edition. The AAC edition comes with chapter markers. You can subscribe to either edition of the podcast directly in iTunes; just search for Smalltalk and look in the Podcast results. You can subscribe to the mp3 edition directly using this feed, or the AAC edition using this feed using any podcatching software. You can also download the podcast in ogg format.

If you like the music we use, please visit Josh Woodward's site. We use the song Troublemaker for our intro/outro music. I'm sure he'd appreciate your support!

If you have feedback, send it to jarober@gmail.com - or visit us on Facebook - you can subscribe in iTunes using this iTunes enabled feed.. If you enjoy the podcast, pass the word - we would love to have more people hear about Smalltalk!

Technorati Tags: , ,

Enclosures:
[im51.mp3 ( Size: 7524271 )]

posted by James Robertson

 Share Tweet This

books

A Dance With Dragons

October 22, 2011 19:15:24.687

I just finished A Dance with Dragons: A Song of Ice and Fire: Book Five - and as per usual, he's thrown a few curveballs at us. Here we are in book five, and we are still being introduced to new characters. There's also a shocking (to me, at least) death near the end of the book - someone who I was sure was going to be a player all the way to the end bought the farm.

I'm still not pleased with what he's doing with Arya - I'd like to see her come back into the main story somehow. At least Tyrion is still a major player - I like that character quite a bit, and he keeps managing to land on his feet (although I'm curious to see how the deal he makes towards the end of this book plays out; his cards seem really weak at this point.

My one complaint was that the book was hard to get back into. Like the Wheel of Time books, the gap between installments has just been too long, and by the time a new one comes along, I've forgotten where the story was. At least winter has finally arrived :)

Technorati Tags:

posted by James Robertson

 Share Tweet This

smalltalk

Metacello Moves Ahead

October 22, 2011 8:36:35.000

Spotted in (gem)Stone Soup

Metacello 1.0-beta.31 has been released. The primary motivation for the release is support for GLASS 1.0-beta.8.7

Technorati Tags:

posted by James Robertson

 Share Tweet This

smalltalk

GLASS Beta Moves Ahead

October 21, 2011 22:34:36.253

Dale has been busy:

GLASS 1.0-beta.8.7 has been released. I’ve been pretty busy since the last GLASS release in March: there are almost 50 bugfixes included in this release.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

st4u

ST 4U 148: Automated Loads in VisualWorks

October 21, 2011 8:56:02.141

Today's Smalltalk 4 You looks at automated loads (from Store) using VisualWorks. I've been doing a lot of work in this area on the project I'm on at work, and I thought it might be worth sharing. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

Automated Loads

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , ,

Enclosures:
[st4u148-iPhone.m4v ( Size: 6885523 )]

posted by James Robertson

 Share Tweet This

smalltalk

Newer Newspeak

October 20, 2011 21:20:05.560

Dart may be the new shiny, but it looks like Newspeak is still getting some love.

Technorati Tags:

posted by James Robertson

 Share Tweet This

js4u

JS 4U 101: The position() Function in JQuery

October 20, 2011 8:59:55.285

Javascript 4 U

Today's Javascript 4 You. Today we look at the position() function in JQuery. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.

Join the Facebook Group to discuss the tutorials. You can view the archives here.

To watch now, click on the image below:

position()

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , ,

Enclosures:
[js4u101-iPhone.m4v ( Size: 1577431 )]

posted by James Robertson

 Share Tweet This

advertising

DLC For Deus Ex?

October 19, 2011 22:36:28.619

I'm a bit skeptical - the game has a defined beginning, middle and end - so I'm skeptical about how well DLC will fit into the narrative. Still, I liked the game, and the DLC is supposed to slot in during a failry obvious interstitial in the game. I downloaded the DLC while I was visiting my sister; we'll see how it goes :)

posted by James Robertson

 Share Tweet This

st4u

ST 4U 147: Using SQL Directly with VA Smalltalk

October 19, 2011 8:54:10.736

Today's Smalltalk 4 You looks at direct SQL access from VA Smalltalk. It's pretty simple, so long as you remember that the API differs when you use select (as opposed to any other SQL operator). If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

SQL Access.

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:


Today we'll look at accessing a relational database using direct SQL statements in VA Smalltalk - to see how to connect, please go back to this tutorial, as we are building on it here. You'll want to take a look at class AbtQuerySpec if you intend to work at this level with your database accessing. The main thing to know is this: if you are querying (using select), then you use #resultTableFromQuerySpec: If you are using any other kind of SQL statement, use #executeQuerySpec: instead. The way you utilize this is pretty simple. To query, use the following kind of code:


"using AbtQuerySpec"
resultCollection := OrderedCollection new.
querySpec := AbtQuerySpec new.
querySpec statement: 'select * from people'.
result := connection resultTableFromQuerySpec: querySpec.
result do: [:eachRow | resultCollection add: (eachRow)].
^resultCollection.

It will look the same with a where clause:


"with a where clause"
resultCollection := OrderedCollection new.
querySpec := AbtQuerySpec new.
querySpec statement: 'select * from people where zipcode = 12345'.
result := connection resultTableFromQuerySpec: querySpec.
result do: [:eachRow | resultCollection add: (eachRow)].
^resultCollection first asDictionary

To use any other SQL statement:


"insert with a query spec"
querySpec := AbtQuerySpec new.
querySpec statement: 'insert into people values (''Fred Flintstone'', ''Rubble Way'', ''Old Town'', ''PH'', 23456, ''456-7890-1234'')'.
connection executeQuerySpec: querySpec.

"commit it"
connection commitUnitOfWork

"delete with a query spec"
querySpec := AbtQuerySpec new.
querySpec statement: 'delete from people where zipcode = 23456'.
connection executeQuerySpec: querySpec.

"commit it"
connection commitUnitOfWork

That pretty much wraps it up for today - we'll look at some more examples next time.

Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.

Technorati Tags: , , ,

Enclosures:
[st4u147-iPhone.m4v ( Size: 5910209 )]

posted by James Robertson

 Share Tweet This