. .

st4u

ST 4U 286: Interesting Collection Methods

September 21, 2012 10:20:01.137

Today's Smalltalk 4 You looks at some of the more interesting methods in the collection hierarchy. 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:

Collections.

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 some of the more useful methods in the Collection class hierarchy, and use some examples to illustrate. We're using VA Smalltal, so fire that up and look at class collection:

Collection

Select the ANSI-API category, and have a look at the methods - you can count on the ones here being implemented (and implemented this way) across all the major Smalltalks. Some of the methods here are "new" - in the sense that the various vendors have only added them to their distributions in the last few years. Today we'll take a look at some of these methods:


coll1 := #(1 2 3 4 5).
coll2 := #(4 5 6 7 8).
coll3 := #(1 1 2 3 3 4 4 5).

coll1 anySatisfy: [:each | each < 10]. true
coll1 allSatisfy: [:each | each < 3]. false
coll1 noneSatisfy: [:each | each > 10]. true

coll1 intersection: coll2. Set(4 5 )

coll2 occurrencesOf: 2 0 

coll3 sorted: [:a : b | b <= a] (5 4 4 3 3 2 1 1)

The results of executing each line of code is after each line (using Display from the workspace menu). If you don't follow why, go ahead and experiment with the examples, and debug through them.

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:
[st4u286-iPhone.m4v ( Size: 5781385 )]

posted by James Robertson

 Share Tweet This

general

Faster

September 20, 2012 14:12:43.056

This makes me happy - especially since I just had to re-download a bunch of large game files after a disk corruption problem

posted by James Robertson

 Share Tweet This

js4u

JS 4U 206: Adding Custom Map UI Elements

September 20, 2012 10:15:04.021

Javascript 4 U

Today's Javascript 4 You adds a custom UI element to a Google map. 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:

Map

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:
[js4u206-iPhone.m4v ( Size: 4345996 )]

posted by James Robertson

 Share Tweet This

smalltalk

Metacello Ported to Smalltalk/X

September 19, 2012 15:40:16.240

Metacello seems to be getting more standardized - it's now moved along to Smalltalk/X

Technorati Tags:

posted by James Robertson

 Share Tweet This

st4u

ST 4U 285: Getting Started with VAST Goodies

September 19, 2012 10:19:41.299

Today's Smalltalk 4 You looks at getting started with the VAST Goodies site (and tools). 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:

Goodies.

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 the VAST Goodies site - it's both an example of a VA Smalltalk application (using Seaside), and a useful site for getting (and contributing) community provided Smalltalk code. In order to make use of it, you first need to load the support code into VA. Fortunately, that's easy - it's right in the features tool:

VAST Goodies

Simply move it over to the right and load - note that all of the pre-reqs get picked up for you:

Load

That gets the tools in - we covered how to make use of them here

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:
[st4u285-iPhone.m4v ( Size: 2507204 )]

posted by James Robertson

 Share Tweet This

smalltalk

Metacello 1.0-beta.31.1.5 brewed

September 18, 2012 20:21:22.779

posted by James Robertson

 Share Tweet This

games

Failing Up

September 18, 2012 17:36:29.125

What happens at BioWare after you completely screw up the ending of Mass Effect? Why, you get put in charge of developing a whole new game universe, that's what:

Both Dragon Age and Mass Effect started as single games but grew into vast universes. But we aren't stopping there. While Casey continues to oversee the development of our new Mass Effect project, he and his leads are putting together their vision for an all new game set in a fictional universe, built from the bottom-up with all new gaming technology.

Add in the idiotic EA theory that every game needs multi-player, and you've got all the components you need for a complete, utter, and total failure.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

js4u

JS 4U 205: Customizing Map UI Overlay

September 18, 2012 9:38:26.155

Javascript 4 U

Today's Javascript 4 You looks at specifying map UI element location in the Google Map API. 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:

map ui

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:
[js4u205-iPhone.m4v ( Size: 2096645 )]

posted by James Robertson

 Share Tweet This

smalltalk

VA Smalltalk 8.5.2 is Out

September 18, 2012 8:37:45.447

You can check out the new release on Instantiation's website

Technorati Tags:

posted by James Robertson

 Share Tweet This

st4u

ST 4U 284: Nautilus Browser Shortcuts

September 17, 2012 15:45:14.919

Today's Smalltalk 4 You looks at the keyboard shortcuts available in the Nautilus browsre in Pharo. 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:

nautilus

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:
[st4u284-iPhone.m4v ( Size: 1136726 )]

posted by James Robertson

 Share Tweet This

podcastAAC

IM 94: Location Aware Networks (AAC)

September 16, 2012 22:22:37.872

Welcome to episode 94 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.

This week we have another recording from the STIC 2012 conference - Chris Muller talking about location aware networks. If you would rather watch the video, head on over to the STIC website.

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:
[im94.m4a ( Size: 21074135 )]

posted by James Robertson

 Share Tweet This

podcast

IM 94: Location Aware Networks

September 16, 2012 22:21:33.688

Welcome to episode 94 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.

This week we have another recording from the STIC 2012 conference - Chris Muller talking about location aware networks. If you would rather watch the video, head on over to the STIC website.

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:
[im94.mp3 ( Size: 15360588 )]

posted by James Robertson

 Share Tweet This

smalltalk

Dr. Geo for iPAD

September 16, 2012 10:07:28.306

Spotted in Planet Squeak

Dr. Geo (aka Dr. Geometry) 12.10 for iPad is available on AppStore. It comes in two versions: gratis and paid.

If you're doing mobile and you want to use Smalltalk, looks like Pharo or Squeak are the way to go.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

smalltalk

New Directions for the Cincom Smalltalk UI?

September 15, 2012 12:01:50.117

Cincom just hired Antony Blakey, who's done some cool add ons for VW in the past.

Technorati Tags:

posted by James Robertson

 Share Tweet This

st4u

ST 4U 283: DoesNotUnderstand Abuse

September 14, 2012 0:20:39.299

Today's Smalltalk 4 You looks at how it's easy to use - and abuse - #doesNotUnderstand: in 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:

MNU.

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 #doesNotUnderstand: - and how you:

  • Can override it to change the way an object behaves
  • Should never do this lightly - it can create situations where your application fails in very hard to understand ways

First, we'll load the SimpleCounter application we used as an example for WebServices, and add this method:


doesNotUnderstand: aMessage
	| arg dict |
	
	dict := Dictionary new.
	dict at: #one put: 1.
	dict at: #two put: 2.
	dict at: #three put: 3.
	arg := dict at: aMessage selector ifAbsent: [nil].
	arg := arg isNil
		ifTrue: [0]
		ifFalse: [arg].
	self perform: #addValue: with: arg

Notice what this does - it treats a few strings as numeric arguments, and then converts anything it doesn't understand into a send of #addValue: with an argument of zero. That seems great - no more MessageNotUnderstood exceptions here. However, consider a more interesting object doing something like this, and passing values down the chain (maybe to a database, eventually). If you're lucky, you only get bad data. If you're unlucky, you get bad data and very, very odd application behavior.

Note the following workspace code:


counter := Counter new.
counter one.
counter two.
counter three.
counter thousand.
counter goAway


All of that now "works" - or at least, none of those message sends break immediately. However, a follow on developer who sees the sending of #goAway, and looks for an implementor will find 26 nothing. That's the danger here. The code is now much more difficult to understand.

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:
[st4u283-iPhone.m4v ( Size: 4741560 )]

posted by James Robertson

 Share Tweet This