. .

js4u

JS 4U 144: JQuery each() Function

March 29, 2012 11:05:03.751

Javascript 4 U

Today's Javascript 4 You looks at the each() 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:

each()

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

posted by James Robertson

 Share Tweet This

smalltalk

ESUG 2012 Call For Participation

March 29, 2012 8:28:24.483

ESUG 2012 is happening in Gent, Belgium this year (August 27-31, with Camp Smalltalk on the 25th and 26th). Get all the details at the conference page.

Technorati Tags:

posted by James Robertson

 Share Tweet This

st4u

ST 4U 212: Customizing log4s output

March 28, 2012 10:40:29.755

Today's Smalltalk 4 You looks at how you can customize the output of log4s data via the built in pattern specifiers - and the support code that you can implement to make use of it. 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:

Logging.

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 take look at customizing your logging (in log4s) via the pattern strings used when setting up a logger. First off, you should look at the documentation, where you'll find this page, explaining the various options:

logging

What we'll do today is set up some object specific logging based on the API supported by our objects. We'll create two simple classes which respond to the same method - #addOne, adding one to a counter. One will implement #printOn: (customizing #printString), the other will implement #printLog4s. To get that all to show up, we'll use the %object specifier in the log setup:


level := EsLogManager getLevel: 'All'.
pattern := EsPatternLayout new: '%date{ISO8601}: [%level]  [%object] %message:'.
transcriptAppender := EsTranscriptAppender level: level layout:  pattern.
logger addAppender: transcriptAppender.

If your object implements #printLog4s, that will get used instead of #printString. Here's what the code for Adder1 and Adder2 (the two classes) looks like:


Adder1:

printOn: stream
	super printOn: stream.
	stream nextPutAll: ' <', count printString, '>'

Adder2:

printLog4s
	^'LOGGING:  <', count printString, '>'

Now we'll execute the following:


"with logging on, go ahead and watch two different results"
adder1 := Adder1 new.
adder2 := Adder2 new.

adder1 addOne.
adder2 addOne.


And this is what we see in the Transcript:


2012-03-28 09:59:22,031: [WARN]  [an Adder1 <1>] Added one:
2012-03-28 09:59:28,937: [WARN]  [LOGGING:  <1>] Added one:


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

posted by James Robertson

 Share Tweet This

js4u

JS 4U 143: Formatting Dates

March 27, 2012 8:41:35.598

Javascript 4 U

Today's Javascript 4 You looks at formatting dates in Javascript. 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:

dates

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

posted by James Robertson

 Share Tweet This

st4u

ST 4U 211: Inspectors and Workspaces in VW

March 26, 2012 9:59:36.193

Today's Smalltalk 4 You looks at the ability to use drag/drop between inspectors and workspaces in VisualWorks (or ObjectStudio). 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:

Workspace

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

posted by James Robertson

 Share Tweet This

PR

How to Create a Bad PR Event

March 26, 2012 7:52:34.237

Microsoft has the latest "how to look stupid in public" example. If you run a contest like that one, you simply have to be prepared to lose a few....

Update: Microsoft quickly figured out what a problem this was, and - to their credit - dealt with it.

Technorati Tags:

posted by James Robertson

 Share Tweet This

podcastAAC

IM 71: STIC 2012 Day 1 (AAC)

March 25, 2012 11:20:20.533

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

This podcast was recorded by Dave Buck and I at the beginning of day 2 of STIC 2012 - we spoke about the various talks we saw on day 1. I'll have a wrap up podcast on STIC 2012 with Bob Nemec next week - that was recorded at the end of day 3 .

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

posted by James Robertson

 Share Tweet This

podcast

IM 71: STIC 2012 Day 1

March 25, 2012 11:19:47.613

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

This podcast was recorded by Dave Buck and I at the beginning of day 2 of STIC 2012 - we spoke about the various talks we saw on day 1. I'll have a wrap up podcast on STIC 2012 with Bob Nemec next week - that was recorded at the end of day 3 .

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

posted by James Robertson

 Share Tweet This

games

Why the ME3 Ending Doesn't Work For Anyone

March 24, 2012 13:24:41.527

The more I think about the ending given to us by Hudson, the more I realize that it doesn't work for anyone - not fans, and - interestingly enough - not for BioWare, since they've said that they want to set future games in that universe (without Shepard). Why doesn't it work? Well:

The Mass Relays are gone. No matter which ending you picked, they all blew up. So consider: every species' fleet is now stranded around earth, with no way home. Mass starvation (and maybe renewed war, as the survivors start blaming humans for the problem). The only ones who survive that mess intact are the Geth, who can live through the long flight to somewhere else.

Now consider the ravaged homeworlds of the various species - mass destruction, and all trade outside their home systems cut off - for a long, long time. The lore has it that the relays have been around "forever" - rebuilding them will be the work of centuries (assuming that the knowledge to do so even exists). It looks like each one will have to be built in place before travel over long distances is possible, so... interstellar travel is basically gone.

So congratulations, Mr. Hudson - you made future storytelling in this universe nearly impossible. Not only did you tick off fans everywhere, but - once your management team realizes just how badly you've screwed the pooch, they won't be happy either. It takes rare talent to irritate all and sundry, but I think you've managed the trick.

This may explain why they've decided to revisit the ending - it's one thing to irritate long time fans; it's something else again to kill a franchise.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

games

A Modest Proposal for ME3

March 23, 2012 22:17:17.625

I've finished the game on the PC, and I'm playing through a second time on my XBox. In that second game, I've just gotten through the end of the Geth/Qurian confrontation. Here's my proposal:

The people who wrote that part of the game? They're awesome. The moron who wrote the end? He needs to be removed from the Mass Effect franchise, post haste. Having done that, have the people who wrote the second act give us an ending that makes sense. That doesn't mean a "happy" ending, btw - it would be entirely reasonable for the ending to be sad.

But it should make sense.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

st4u

ST 4U 210: Filtering Logs by Level

March 23, 2012 9:33:19.442

Today's Smalltalk 4 You looks at filtering logging events in log4s using logging levels. 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:

Logging.

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 take a closer look at logging levels in log4s. To quote the documentation in VA Smalltalk:

The concept of levels is central to log4s. A loggingEvent will be logged by an Appender if the level of the loggingEvent is greater than or equal to the level of the Appender. Both LoggingEvents and Appenders have levels. Log4s has seven predefined levels which are implemented as EsLevel class variables.

There are 7 levels to logging - in order from the lowest (everything gets logged) to the highest (nothing gets logged), they are: All, Debug, Info, Warn, Error, Fatal, Off. So if you set the level for an appender to "Error", and then send a "Warn" level message, it will not appear in that appender's stream. For example - recall that we've set up the root logger with a file appender:


[log4s]
debugEnabled=true
quietMode=false
globalLevel=All
dailyRollingFileAppender =(fileAppender, root, vaLog.log, false, Info, EsPatternLayout,
 'ڴe{ISO8601}: [%level] %message', true, topOfDay )


That will log everything to a file. Let's set up a new appender to the Transcript, but set it up at the "Error" level - meaning, it will ignore all logging events under that:


"Add a transcript appender programmatically, but set at a higher level"
level := EsLogManager getLevel: 'Error'.
pattern := EsPatternLayout new: 'ڴe{ISO8601}: [%level] %message'.
transcriptAppender := EsTranscriptAppender level: level layout:  pattern.
logger addAppender: transcriptAppender.

Now we have two appenders for the default logger - the file appender will get every logging event, while the Transcript will only see things at level "Error" and above. To demonstrate, let's send a warning event:


EsLogManager warn: 'This is a warning!'.


The File log has that, while the Transcript is blank:

Logging

Now let's send an error level event, and look again:


EsLogManager error: 'This is an Error!'.

Logging

Notice that this time, the event hit both logs - the file appender gets everything, while the Transcript appender got the higher level event only. Next time, we'll get into filtering and the print format.

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

posted by James Robertson

 Share Tweet This

smalltalk

Pharo in the Spring

March 23, 2012 9:28:07.000

posted by James Robertson

 Share Tweet This

stic12

Smalltalk Research

March 23, 2012 7:24:45.220

The call for papers for the next STIC came out on the ESUG mailing list, from Georg Heeg:

In June 2013 we will also have Smalltalk Directions 2013 organized by Smalltalk Academic Advisory Board STAAC. The formal call for papers will go out soon. But you can start planning to submit your research results today. The topics will probably be along the lines of this year’s call for papers. The papers will get reviewed and published and in the presentation you will get into contact with co-researchers and industrial Smalltalk users from all over the world.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

smalltalk

Pharo and Oracle

March 22, 2012 21:27:38.824

I'll have to check this page out (I'm future posting this from a plane at the moment) - Pharo and Oracle help. The last time I tried to get those two to talk, I had issues :)

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

js4u

JS 4U 142: Timestamps in JQuery

March 22, 2012 8:47:27.006

Javascript 4 U

Today's Javascript 4 You looks at using Timestamps in JQuery for simple profiling of functions. 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:

profiling

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

posted by James Robertson

 Share Tweet This