. .

st4u

ST 4U 87: Debug Any Process in VA Smalltalk

May 25, 2011 8:20:32.119

Today's Smalltalk 4 You shows you how easy it is to grab an arbitrary VA Smalltalk process and load it into the debugger. This can be useful a few different ways - exploring the system, or killing a runaway process that you didn't keep a variable reference to. If you prefer a written walkthrough to video, then skip down to 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:

Debug Any ST Process

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 debugging arbitrary processes in VA Smalltalk, which is easy using the debugger. To show that off, we'll create a Smalltalk process in the workspace, and then grab it with the debugger. Here's the code to kick off a simple process:

Fork a Process

And here's a look at the Transcript, which shows that the process is, in fact, running:

Running Process

Going back to the launcher menu, select Tools, go all the way to the bottom, and open the debugger:

Open the Debugger

You haven't opened the debugger on a specific process, so it's empty. That's something we'll fix in a moment. Under the Processes menu, select the first option, Debug Other:

Debug Other Process

What you'll see now is a small window with a list of processes in it. These are Smalltalk processes, controlled by the VA Smalltalk environment:

Process List

You can select any of them and start debugging them in the debugger, including main system processes. This is a great way to see how things work in any Smalltalk environment, but here we've selected the process we forked off above. One of the other things you can do with this feature is select a process so that you can terminate it - useful if you've forked one off, and haven't maintained any direct access to it. Here's the process in question in the debugger:

Debugging

Now that you've grabbed the process in the debugger, it's easy to kill it. Simply go back to the Processes menu, and select Terminate:

Terminate

In this example, we held a reference to the process in the workspace, so we can inspect it (as seen below). If you didn't, simply repeat this process, and you'll see that the list of processes is one smaller:

Inspect the Variable

Looking below, you can see in the inspector that the process is dead. That solves the problem of grabbing an arbitrary process we don't want or need any longer and killing it:

Inspecting the Process

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

posted by James Robertson

 Share Tweet This

smalltalk

Comparing Objects in a Complex UI

May 25, 2011 14:25:52.731

This afternoon I had to export part of a tree of objects from one UI to a smaller one (to allow for end user editing of those objects). This all backs to a database, so I didn't want the AspectAdaptors (this is VisualWorks) I was hooking up to make changes to the actual domain objects; I wanted copies. Using #copy and #postCopy is pretty straightforward, but I wanted to check to make sure that I was doing it correctly

As part of our development toolset, we have some mods that add a little "inspect it" button to every window. That's highly useful, and got me most of where I wanted to go. The last step was simply using base functionality of VW that a lot of people probably aren't aware of - you can drag objects from an inspector and drop them on a workspace, creating a workspace variable that points to that object. Doing that from each piece of the UI, I was then able to run a simple #== check on the objects, and verify that my copy operation was working correctly. Kind of a cool thing to be able to do, that drag/drop between tools.

posted by James Robertson

 Share Tweet This

smalltalk

Fuel For Pharo

May 25, 2011 14:29:20.000

BOSS is one of the more useful pieces of VisualWorks, so I'm interested to see that the Pharo project is acquiring a modern equivalent. Via Torsten:

Fuel - a new project to implement binary object serialization for Pharo is part of the ESUG SummerTalk. It's work in progress but already usable, there is a ConfigurationOfFuel metacello config to easily load it.

The existence of a Metacello configuration is key - it makes it very, very easy to load (and thus much easier to contribute to the project). Good stuff!

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This

smalltalk

Server Side JTalk

May 25, 2011 19:00:00.000

Looks like JTalk is still making good progress:

As announced in an earlier blog-post, i implemented a RemoteRunner for the jtalk-server (based on the jtalk-project). It's very simple: if you implement a Method runRemote in your class, e.g. RemoteTest, then by executing:

RemoteRunner new runClass: RemoteTest


will execute the Smalltalk-Code implemented in the runRemote-Method on the server. The example prints out the date and time of the server.

posted by James Robertson

 Share Tweet This

js4u

JS 4U 59: URL Encoding Data with JQuery

May 26, 2011 7:41:43.771

Javascript 4 U

Today's Javascript 4 You. Today we look at using JQuery to encode urls - something you need to do for many of the optional function arguments. 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:

URL Encoding

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

posted by James Robertson

 Share Tweet This

social media

Irony Not Dead

May 26, 2011 8:50:42.000

I saw a reference to the book "Dancing with Digital Natives" on David Meerman Scott's blog, so I went to Amazon to have a look - figured I might want the ebook. Utter fail - the book is out in dead tree only.

posted by James Robertson

 Share Tweet This

travel

Stuck

May 26, 2011 16:08:06.274

Looks like it's one of those travel days. First, I finally had to deal with one of the new scanners. I opted out, of course - if TSA wants to run security theater, the only protest I can lodge is to waste their time. With that out of the way, I got onto an earlier flight headed to DCA instead of BWI (good news, since I forgot about my bifurcated flights this week and parked down near DCA).

That's pretty much when the good news ended though; now we have about 90 minutes of ground hold, due to T-Storms between here and DC. Joy :)

posted by James Robertson

 Share Tweet This

st4u

ST 4U 88: Another Route to the VA Debugger

May 27, 2011 6:59:37.386

Today's Smalltalk 4 You shows you another way to get immediate access to the debugger in VA Smalltalk - the little "Debug THis" window that appears in the lower right corner of the screen when you start up the development environment. If you prefer a written walkthrough to video, then skip down to 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:

Debug Any ST Process

The video at the link has been reformatted to a smaller size; you can view the full size video as an MP4, or in Windows Media Format.

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 another route into the debugger in VA Smalltalk, which can be useful when trying to grab the foreground process. To show that off, we'll again create a Smalltalk process in the workspace, and then grab it with the debugger. Here's the code to kick off a simple process:

Fork a Process

Now, when you started up VA, you may not have noticed the tiny little window in the lower right hand corner. It has one button, and gives you immediate access to the Debugger:

Get a Debugger

If you click that, instead of an empty debugger (which we saw in the last tutorial), you'll get the foreground process:

Open the Debugger

Now you can follow the same steps to debugging/terminating the errant process, via the Debug Other menu pick:

Debug Other Process

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

posted by James Robertson

 Share Tweet This

stupidity

Lets Break the Internet

May 27, 2011 10:07:17.937

In the annals of stupid, this is pretty high up - a Senate committee wants to break the internet:

The legislation will allow the DOJ to target the "worst of the worst" foreign websites dedicated to digital piracy or selling counterfeit goods, said Senator Patrick Leahy, a Vermont Democrat and lead sponsor of the bill. Intellectual property theft is "unacceptable," Leahy, chairman of the committee, said in a statement.

This is great - the practical impact would be to have a set of alternate DNS servers pop up. Instead of the mostly unitary net we have now, we'll have chaos. That seems to be what Congress does best though...

Technorati Tags:

posted by James Robertson

 Share Tweet This

weather

Stalked by T-Storms

May 27, 2011 21:22:24.734

Didn't I see this movie last week in Dallas?

posted by James Robertson

 Share Tweet This

humor

Replace Ballmer!

May 28, 2011 12:43:44.763

PC World has some ideas about who should get the gig :)

posted by James Robertson

 Share Tweet This

gadgets

Where is Facebook on the iPad?

May 28, 2011 18:50:58.000

TechCrunch asks an excellent question - where the heck is the iPad app for Facebook? The iPhone app looks kind of stale for that matter - maybe they can't find anyone to replace the guy who famously declared that he wasn't doing that work anymore (which should have led to his immediate termination, IMHO, but that's another story).

So here it is, 2011, and there's still no iPad app - meanwhile, Facebook is looking for help on the desktop:

On the jobs page for the relatively new Seattle Facebook office, one of the openings is for “Software Engineer, Desktop Software”. Desktop software. Desktop. Before the damn iPad. Hey Facebook, 1986 called, they want their strategic vision back.

Apparently, this is the start of some big team. I think TechCruch is right - they lost their calendar, and think they are living through a re-imagined "Back to the Future", set in the 80's....

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This

law

How Bad is Protect IP?

May 29, 2011 10:43:49.482

I was ready to just call it stupid the other day - now I see that not only is it stupid, it's actually dangerous in a lot of ways. That's Congress for you - they can't limit themselves to being stupid, they have to do actual harm while they're at it.

At this point, I think the cost/benefit for both copyrights and patents have flipped. Unless both are reformed in a "start from scratch" sort of way, we'd be better off without them.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

podcast

IM 31: Seaside and Rails

May 29, 2011 20:08:21.785

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

This week I have another session from Smalltalk Solutions 2011 - Pat Maddox, talking about using Seaside and Rails together. The abstract for the talk was:

Ruby on Rails has proven to be the best framework for developing open applications and platforms on the web. Seaside excels at building intelligent applications by hiding the complexity of session-based user interaction. This talk will highlight the strengths, weaknesses and impacts of each of these frameworks, and will examine how to use them together to build open, intelligent applications.

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

posted by James Robertson

 Share Tweet This

podcastAAC

IM 31: Seaside and Rails (AAC)

May 29, 2011 20:08:44.255

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

This week I have another session from Smalltalk Solutions 2011 - Pat Maddox, talking about using Seaside and Rails together. The abstract for the talk was:

Ruby on Rails has proven to be the best framework for developing open applications and platforms on the web. Seaside excels at building intelligent applications by hiding the complexity of session-based user interaction. This talk will highlight the strengths, weaknesses and impacts of each of these frameworks, and will examine how to use them together to build open, intelligent applications.

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

posted by James Robertson

 Share Tweet This

history

Memorial Day

May 30, 2011 10:04:04.681

Memorial Day, 2011

posted by James Robertson

 Share Tweet This

smalltalk

Making Storage Simpler

May 30, 2011 10:19:05.401

Sean DeNegris talks about simpler data storage:

In an enlightening blog post, Ramon Leon explains that most applications are designed for small businesses with small amounts of data. Therefore  most applications will never have to scale (i.e. become the next Twitter), so a relational database is overkill. However, persisting by simply saving the image is slow and error-prone.
Based on these ideas, he suggests a simple (one class) framework which saves only your model. The idea is to use it as long as you can get away with, which may be forever.
I packaged the code from the post, added a few tests, and put it on SqueakSource as SimplePersistence.

You have no idea how many security headaches I've avoided by using binary serialization to store the posts on this blog instead of a SQL Database. As with Sean's example, my storage needs are lightweight, and a relational database would be overkill. Not to mention being an attack vector....

Technorati Tags:

posted by James Robertson

 Share Tweet This

js4u

JS 4U 60: JQuery No Conflict

May 31, 2011 9:48:49.874

Javascript 4 U

Today's Javascript 4 You. Today we look at using the JQuery noConflict() function. It's common to make use of multiple Javascript libraries in a web app, and some libraries might also want to use the $ symbol for variable access. Never fear - JQuery has a way to deal with that problem. 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:

No Conflict

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

posted by James Robertson

 Share Tweet This

general

Graduation Day

June 1, 2011 1:09:51.547

My daughter is out of high school - off to college in the fall:

posted by James Robertson

 Share Tweet This

smalltalk

Uniscribe Interface in Smalltalk

June 1, 2011 8:29:57.000

Travis has been working on an interface to Uniscribe:

I've been working on a Uniscribe interface to VisualWorks Smalltalk off and on for the last two weeks or so. One of the frustrating things for me so far, is the lack of a good post-doc resource to go to for help with this stuff. There's the MSDN docs, which are OK, but when you have questions beyond that, I have as of yet, not found any of the resources I'm used to using for this kind of thing, such as mailing lists, etc. And the amount of "tutorial" style pages out there is pretty small. So I thought I'd at least leave a trail of breadcrumbs here.

Technorati Tags:

posted by James Robertson

 Share Tweet This

st4u

ST 4U 89: Tracking VW Overrides

June 1, 2011 10:14:31.138

Today's Smalltalk 4 You looks at tracking overrides in VisualWorks - something that's useful when it's time to update from one version to another, and you need to know how many problems you'll have doing so.. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.

VW Overrides

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

posted by James Robertson

 Share Tweet This

smalltalk

Squeak Source 3 Alpha Goes Live

June 1, 2011 11:58:19.777

If you want to test Squeak Source 3, it's live - but it's for testing right now, note the warning:

The contents of this repository will NOT survive beyond the lifetime of the public Alpha. DO NOT store anything you are not willing to lose in this repository.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This