Skip to content

Welcome to Our Planet

This is the "planet" site for the Western MA Developers' Group. All of our blog posts are aggregated here so that we can keep track of what our member's are writing about.

pushd, I hardly knew you


Published to unCLog by Gary King July 01, 2009 22:28

From a tech/geeky point of view, this is embarrassing enough that I probably shouldn’t mention it. There is hope, however, that some other soul will benefit from my pain.

If you use the *nix (or OS X) command line, you probably know about pushd. It and its companion popd let you push and pop (duh!) a stack of directories so that you can jump from place A to place B and then quickly jump back. Cool.

The embarrassing part is the way in which I was using pushd. I thought that I had to push the directory I wanted to come back to before I went there. So I would:

> pushd .
> cd /someplace
> ... do stuff ...
> popd

This works, but it (obviously) looks sort of, well, dumb. Somehow, when I learned about pushd, I never learned that it acts just like the change directory (cd) command. I.e., that the argument to pushd was the directory to which you want to move and that it saves your current directory automatically. Thus, the correct (more efficient) way to use pushd is:

> pushd /someplace
> ... do stuff ...
> popd

It only eight fewer keystrokes but it’s conceptually much cleaner. The morass of the story: use pushd but use it correctly. Alternately, keep reading the manual, you’ll probably still learn something!

iTunes app store and 17+ content


Published to unCLog by Gary King June 28, 2009 15:07

With OS 3.0, the iPod/iPhone and Apple’s iTune’s store support content ratings. This is good: I’m all for free expression, adding another layer of maturity (pun intended) to what’s available, etc. However, I don’t want to have to see it and I think Apple should do better. There are two issues:

  1. I have to opt-out of seeing 17+ (or 12+ or whatever) content. This means I need to know that there is such a preference and where to find it and change it.

  2. Even if I opt out, the App store still shows me the objectionable (and often objectifying) apps. iTunes won’t let me buy a restricted app, but I still see them (and since sex sells, the most popular application listings usually contain stuff I’d rather was left out).

In my opinion, Apple should make two changes:

  1. Filter what is shown in iTunes before I get a chance to buy it. The app store makes it easy to download and buy. If I don’t want to see pornography (or if I don’t want my kids to be exposed to pornography), then I don’t want to see that “hot babes whatever” is the number 2 application today.

  2. Make it easier to opt-out of the potentially objectionable content.

    • Unless there is a legal reason for having the out-of-the-box behavior be “show everything”, then Apple should err on the side of caution and hide anything not suitable for general audiences.

    • If free-speech laws mean that everything must be seen by default, then make setting up these controls a required additional step the first time the new iTunes is started. (Yes, this isn’t ideal for a host of usability and don’t piss people off reasons but it would make iTunes a better citizen).

It’s great that Apple is opening up the store to more interesting (er…) applications but there is no reason to flaunt this new content where everyone can see it. Parent’s would rather this stuff was harder to find and people that object to objectification would rather not be reminded of it every time they go to the App store.

Seeing, Believing, not.


Published to unCLog by Gary King June 27, 2009 13:07

[Too cool for words][wb]

“WASHINGTON, D.C. (ISNS) — The three best visual illusions in the world were chosen at a gathering last weekend of neuroscientists and psychologists at the Naples Philharmonic Center for the Arts in Florida.”

(via Dynamic Diagrams)

Clay Shirky on TED


Published to unCLog by Gary King June 23, 2009 00:03

Talks about the new social media. Nice.

Books read lately


Published to unCLog by Gary King June 22, 2009 23:45

Tender to the Bone is Ruth Reichl’s first memoir dedicated to food and love and family. It’s a very nice read. (A)

Life Sentences is a mixture of memoir (fictional), mystery, and race relations set in present day Baltimore. I listened to this on tape and really enjoyed it. (B+)

I finally read Michael Lewis’s Moneyball to be engaging, entertaining and fun. I also learned a lot about baseball. (A-)

On the other hand, I found Buzz Bissinger’s Three Nights in August to be bombastic and far too full of sports cliches and tired sentences to be worth finishing. (C-)

Discoveries This Week 06/21/2009


Published to Rick Minerich's Development Wonderland by Richard Minerich June 22, 2009 01:22

Almost too much to keep up with this week.  Most notably, Roger Castillo gave a fantastic talk on F#’s Language Oriented Programming features.  Also interesting, the Microsoft Research F7 project, Symbolic Differentiation, and tail call optimized corecursion.

 

Roger Castillo’s Language Oriented Programming in F#

Roger will present one approach to Language Oriented Programming in F#, a technique in which software designers borrow techniques from language design to organize software architectures.

The most advanced F# talk I’ve seen to date.  In this talk, Roger examines some of F#’s LOP features and discusses a methodology for leveraging said features to build DSLs.

 

F7: Refinement Types for F#

F7 is an enhanced typechecker for the F# programming language. F7 supports static checking of properties expressed with refinement types. Our motivation is to check various security properties of F# implementation code by typing.

A very exciting Microsoft Research project.  Static checking of cryptographic protocols and access control mechanisms could do much for safety if used generally.

 

Symbolic Differentiation in C#/F#

[A] simple C#/F# library for Symbolic Differentiation and whatever else comes to mind.

Some features, such as parallel computation of expressions, are only supported in F#.

 

Jomo Fisher’s Adventures in F# – Corecursion

Mutual recursion is a useful feature and I was sure F# must have a way to support it. I searched around quite a bit, but I didn't know the right question to ask the search engines. Eventually, I got some help from my friend  Luke Hoban.

I was interested to find out that tail recursion optimization works with corecursion as well.

 

F# Cheat Sheet

This sheet glances over some of the common syntax of the F# language. It is designed to be kept close for those times when you need to jog your memory on something like loops or object expressions.

Very useful to have on hand when teaching F#.

Meeting this Week: Wednesday June 17


Published to wmassdevs by Planet Administrator June 15, 2009 14:20

That’s right, we have another meeting coming up this week. We’ll be
meeting in our usual location at the Snowtide Offices in
Northampton, they’re located in the Potpourri Plaza on King Street
(across the street from the Stop & Shop). We will be shopping for
snacks, if you could post to our mailing list to let us know your
coming, we’ll be sure to have enough eats for all. Attendance has been
light lately now that summer is setting in, letting us know you’re
coming is a huge help!

Topics

We’ll be sticking with the unconference format, it’s been working
well and people have been coming up with some great topics. The
discussion has been lively and we don’t want to mess with that. If you
have a topic you want to speak on, post it to our topics wiki and
let people know. I don’t know about anyone else, but when I see some
interesting topics on the wiki, it encourages me to both attend the
meeting and come up with a topic of my own.

Speaking of topics, I haven’t been doing anything that exciting
lately; it’s all wedding stuff all the time for me. That said, I have
been spending a lot of time using Emacs (I used to be all about
the Textmate) and I’m thinking about trying out a polyphasic
sleep schedule
. Is anyone interested in either of these? I think I
can work up five minutes of substance.

Schedule

Lastly, here’s a rough outline of our schedule…

  • 6:45 - 7:00 — room and food setup (let Chas know via the list
    if you can help setup)
  • 07:00 - 07:30 — eat, meet and mingle
  • 07:30 - 08:15 — first time slot for topics
  • 08:15 - 09:00 — second time slot for topics
  • 09:00 - 10:00 — more time to mingle and clean-up (everyone has been
    great about cleanup and the help is really appreciated)

Discoveries This Week 06/14/2009


Published to Rick Minerich's Development Wonderland by Richard Minerich June 15, 2009 00:09

Another great week in F#.  Most importantly, it is now known that the language will continue to be available for free, despite productization.  Also, the F# PowerPack is now available for VS2010 beta and the MSDN documentation is up.

 

Tore Green asks Don Syme “will F# continue to be freely available?”

Free options will continue to exist, most likely through the VS shell. For example, we'll be continuing with our VS2008 plugin until the plans around a VS2010 shell finalize.

It is very good to hear that the productization of F# won’t stop it from continuing to be available for free.

 

Tomas Petricek’s WebCast – Using Asynchronous Workflows

Now that Visual Studio 2010 Beta 1 is out, it is finally a good time to take a look at one of the (in my opinion) most interesting new features in the new release - the F# language.

In this Webcast, Tomas shows how simple it is to add asynchronous operation to an application via the F# asynchronous workflow feature.

 

F# PowerPack Beta 1 for .NET 4.0/Visual Studio 2010 is Available.

F# PowerPack is now available for download for the latest Beta development milestones of the next generation of Microsoft's development platform and tools.

I know a great many people (not to mention myself) were disappointed that the VS 2010 beta did not ship with this.  I for one am in love with it’s Math and Charting features.

 

Visual F# MSDN Documentation

The Visual F# product provides support for developing F# applications or extending other .NET applications with F# code.

We now have official documentation in the MSDN style we all know and love.

 

F# – You can overload operators, but you can’t use them.

^ (op_Concatenate): Compiler error in F#. Apparently only strings can be concatenated.

> (op_GreaterThan): Runtime Error – Failure during generic comparison: the type Program+OppTest4 does not implement the System.IComparable interface.

It’s not what you say but how you say it, and while I feel the reaction of the author was way over the top, his concerns seem justified.  I’m hoping it’s just a bug and, now being identified, will be resolved.

Code Camp Hartford 2 Presentation – F# for Testing and Analytics (June 13th)


Published to Rick Minerich's Development Wonderland by Richard Minerich June 12, 2009 19:22

I will be speaking at tomorrow’s Code Camp Hartford 2 on the topic of using F# for the Testing and Analysis of existing code. This talk will be composed of much of the same material I used at Code Camp Waltham 11, although I will be preparing additional introductory material as many of my Waltham attendees had no prior exposure to F#. 

I hope the audience will find this new introduction short and sweet.  In this case my goal will not be to teach F# per se, instead I would like to impress upon the audience the power of using functional programming constructs.

 

Presentation Details

F# for Testing and Analytics will be held in Room E-Echo at 10:30am.

As I often like to make changes up to the last minute, this post will be updated with my slides after the presentation. Slides are now available here.

 

The Plan

For more information, see my post on the Code Camp Waltham 11 Presentation.  I wrote quite extensively in that post on most of the things I will be discussing in this talk.

A Short History of Programming Languages


Published to Rick Minerich's Development Wonderland by Richard Minerich June 11, 2009 17:42

Recently, I was reading David R. Tribble’s annotated version of Dijkstra’s famous letter “Go To Statement Considered Harmful”.  While in the process of reading, it occurred to me that I did not really understand the history of language abstraction.  To remedy this I’ve done some research and put together the following post.  I hope you find it as educational to read as I found to write.

Programming languages are often spoken of in terms of their level of abstraction.  To this end there is a somewhat official classification system.  In said system, each generation in the hierarchy represents another level of abstraction away from the machine hardware. 

 

First-generation programming language (1GL) – Binary

I think there is a world market for maybe five computers.
-Thomas Watson

It makes sense Watson would say this seeing as how the earliest computers were programmed entirely in binary.  These computers were programmed with no abstraction at all.  I, for one, do not envy our forefathers in regard to this task.  While the programs were small, all operations, data and memory had to be managed by hand in binary.

  • Introduced in the 1940s
  • Instructions/Data entered directly in binary
  • Memory must be manually moved around
  • Very difficult to edit/debug
  • Simple programs only

Examples:

Architecture specific binary delivered on Switches, Patch Panels and/or Tape.

 

Second-generation programming language (2GL) – Assembly

He who hasn't hacked assembly language as a youth has no heart. He who does as an adult has no brain.
-John Moore

Assembly languages were introduced to mitigate the error prone and excessively difficult nature of binary programming.  While still used today for embedded systems and optimization, they have mostly been supplanted by 3GL languages due to the difficulties in controlling program flow.

  • Introduced in the 1950s
  • Written by a programmer in an intermediate instruction language which is later compiled into binary instructions
  • Specific to platform architecture
  • Designed to support logical structure, debugging
  • Defined by three language elements: Opcodes (CPU Instructions), Data Sections (Variable Definitions) and Directive (Macros)

Examples: 

Almost every CPU architecture has a companion assembly language.  Most commonly in use today are RISC, CISC and x86 as that is what our embedded systems and desktop computers use.

 

Third-generation programming language (3GL) – Modern

“Real programmers can write assembly code in any language.”
-
Larry Wall

Third generation languages are the primary languages used in general purpose programming today.  They each vary quite widely in terms of their particular abstractions and syntax.  However, they all share great enhancements in logical structure over assembly language.

  • Introduced in the 1950s
  • Designed around ease of use for the programmer
  • Driven by desire for reduction in bugs, increases in code reuse
  • Based on natural language
  • Often designed with structured programming in mind

Examples:

Most Modern General Purpose Languages such as C, C++, C#, Java, Basic, COBOL, Lisp and ML. 

 

Fourth-generation programming language (4GL) – Application Specific

"A programming language is low level when its programs require attention to the irrelevant."
-Alan J. Perlis

A fourth generation language is designed with making problems in a specific domain simple to implement.  This has the advantage of greatly reducing development time cost.  At the same time there is the disadvantage of increasing developer learning cost.

  • Introduced in the 1970s, Term coined by Jim Martin
  • Driven by the need to enhance developer productivity
  • Further from the machine
  • Closer to the domain

Some examples: SQL, SAS, R, MATLAB's GUIDE, ColdFusion, CSS

 

Fifth-generation programming language (5GL) – Constraint Oriented

“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.”
- Tony Hoare

It has been argued that there is no such thing as a 5GL language.  This seems to me ridiculous as working with domain specific syntax is hardly an abstractional dead end.  This cynicism is likely a result of the many false claims of 5GL for the sake of marketing.

Many researchers speak of 5GL languages as constraint systems.  The programmer inputs a set of logical constraints, with no specified algorithm, and the AI-based compiler builds the program based on these constraints.

  • Introduced in the 1990s
  • Constraint-based instead of algorithmic
  • Used for AI Research, Proof solving, Logical Inference
  • Not in common use

Some examples: Prolog, Mercury

 

Conclusion

An interesting history lesson, although, I can’t help but feel that categories beyond 3GL are somewhat arbitrarily defined.  I do agree that 4GL is an abstraction on 3GL.  Perhaps however, there are other directions which are equally abstract in relation to 3GL.  Perhaps after concrete logic based systems, free form natural language should have been fourth.  This could be followed by thought based, which I feel would be the ultimate level of abstraction for human interaction.

Also, to my great disappointment, I was unable to find out who coined most of the “# generation language” etymologies.  As usually in computer science it is possible to gain insight on a concept by examining the author’s other works, in this case that option seems unavailable. 

 

Other References:

Introduction to Assembly Language
Generations of Programming Languages