What is your "spirit programming language"?

The definition of a “spirit animal”:

In certain spiritual traditions or cultures, spirit animal refers to a spirit which helps guide or protect a person on a journey and whose characteristics that person shares or embodies. It is also metaphor, often humorous, for someone or something a person relates to or admires.

dictionary.com

Someone at Quora asked: How do you decide what is your “spirit programming language”?

I found this question intriguing. It speaks to the special nature of programming languages and how one may have a particular affinity to a specific language. I think many developers do have a spirit programming language, even if they don’t realize it.

Here was my answer…

There are several things you may consider:

  1. which language offers the most job opportunities — this is decidedly a very pragmatic consideration because we all have to eat
  2. which language appeals to you aesthetically and philosophically — this is, of course, very much a matter of individual taste
  3. which language is primarily used in your preferred application domain — assuming, of course, that you have a preferred application domain
  4. which language you find very easy to use and makes you most productive — this can only come from your personal experience
  5. which language is most versatile — it can do nearly everything with equal aplomb

So, based on these considerations, you might choose one of the following as your “spirit programming language”:

  1. Python or Java — at Indeed, they have the most job postings
  2. if you’re inclined toward functional programming, look at Elixir; if you’re inclined toward object-oriented programming, look at Pharo
  3. if your preferred domain is front-end web, JavaScript is really your only choice; if you prefer data science, Python is your best choice
  4. without doubt, Smalltalk (or Pharo) is the most productive language, by far, because it’s so ridiculously easy to use
  5. there are several enormously versatile languages to choose from: C++, Java, Python, Smalltalk (or Pharo)

Smalltalk (Pharo) became my “spirit programming language” because:

  • it’s really, really easy to learn and easy to use, much more so than, say, Python
  • it’s the most productive programming language in the world
  • its object-oriented purity, clarity, and consistency are beautiful to behold
  • its live coding capability is wonderful
  • its metaprogramming capability is wonderful
  • it’s amazingly versatile…

Use Pharo for back-end web with Seaside and Teapot frameworks.

Use Pharo for front-end web with Amber and PharoJS.

Use Pharo for data science with PolyMath, Roassal, and Moose.

Use Pharo for machine learning with TensorFlow and Keras.

Use Pharo for Internet of Things with PharoThings.

Use Pharo for robotics with PhaROS.

Use Pharo for virtual reality:

Use Pharo for scripting the Unreal game engine:

Here’s a fantastic Roassal demonstration:

Here’s a great demonstration of Pharo’s live coding:

Here’s a nice game for mobile that was written in VisualWorks Smalltalk: HexSolve.

50th Anniversary of Smalltalk

As He often does, God spoke to me very early this morning while I was in bed. Not in a dream but in a dream-like state…

For the past year, I’ve been struggling to find a way to celebrate the 50th anniversary of Smalltalk in 2022. I even published an article asking for suggestions but I got no feedback at all. Apparently, there is a worldwide lack of imagination, even among Smalltalkers.

Early this morning, the idea struck: for 2022, we should conduct a…

Camp Smalltalk Supreme

or CSS.

It would be a week-long affair held on the campus of Ryerson University.

It would consist of a series of Smalltalk workshops conducted by Ryerson, Simberon, and TSUG. (And whomever else we can rope in.)

It would consist of presentations by Smalltalk companies, researchers, and devotees.

We would invite Alan Kay, Dan Ingalls, and Adele Goldberg (call them the PARC Team) to give keynote speeches. We would invite the media to interview them.

The PARC Team would attend a Question and Answer session whereby the public could ask questions about Smalltalk’s history, philosophy, and social and technological impact.

We would hold a day-long hackathon with a $1,000 prize for the most outstanding Smalltalk creation. (Or maybe do something along the lines of Battlesnake.)

We would give away Smalltalk keychains to all attendees (up to 1,000).

In lieu of a free T-shirt giveaway, we would sell up to a thousand Smalltalk T-shirts at the ridiculously low price of $5 a pop.

We would hold a Smalltalk art auction with artwork donated by Smalltalkers around the globe. The proceeds would go toward COVID-19 relief.

Here’s the kind of artwork I would imagine:

We would hold a celebration banquet (at a Chinese restaurant?). 😀

Between Ryerson’s PR department and my exceptional video creation skills, we would have a fantastic online presence: a multimedia history of Smalltalk!

I would try to secure funding through:

  • corporate sponsorship
  • GoFundMe
  • the money I saved in JRMPC from not flying in the Alberta team and not holding the banquet
  • I’d even kick in a thousand dollars of my own money

Alas, this is all just a dream (or trance-like state in the wee hours of the morning). I rather doubt I can get anyone to buy in to my divine fantasy.

But such divine fantasies are the reason why there is even a JRMPC today.

COVID-19 and JRMPC

Due to the COVID-19 crisis, the JRMPC awards ceremony has been postponed till a later date.

It was originally going to be held at Ryerson University, one of our chief sponsors, on April 18th.

In the worst case that the ceremony cannot be held by the start of summer, a virtual awards ceremony will be conducted. This ceremony will be recorded and a special YouTube video will be made for all of you to enjoy.

For more information about JRMPC, visit JRMPC 2020 Award Winners.

JRMPC 2020 Award Winners

I am most pleased to announce this year’s winners of The James Robertson Memorial Programming Competition. It was an exciting contest with several teams consistently finishing in a strong position over four rounds:

  • The Battle of Waterloo from Woodbridge College in Vaughan, Ontario
  • Bickle Blatwoon from Robert Thirsk High School in Calgary, Alberta
  • ‘Dief’ferent from John G. Diefenbaker High School in Calgary, Alberta
  • Quad Coders from St. Michaels University School in Victoria, BC
  • The Sticky Keys from Strathcona High School in Edmonton, Alberta
  • WCI1 from Waterloo Collegiate Institute in Waterloo, Ontario

Thus, they were the favourites to win. But as Duncan MacLeod from Highlander might say, “There can be only one.”

In Round 5, the prize-winning round, the titanic struggle can be seen in this video:

So, here are the winners:

First Prize of $6,000 goes to team ‘WCI1’ of Waterloo Collegiate Institute in Waterloo, Ontario.

  • Keenan Gugeler (Captain)
  • Alex Liao
  • Ethan White
  • Thomas Ingram

Second Prize of $4,000 goes to Team Dijkstra of Centennial Collegiate Vocational Institute in Guelph, Ontario.

  • Andrew Dong (Captain)
  • David Xiao
  • Alexander Liu
  • Brayden Chumbley

Third Prize of $3,000 goes to team ‘Bickle Blatwoon’ of Robert Thirsk High School in Calgary, Alberta.

  • Xinhua Cao (Captain)
  • Hunter Chen
  • Umut Emre
  • Ethan Kerr

Additional recognition: the Honour Roll

The following teams are recognized for their fine efforts. They are awarded $500 each.

  • The Battle of Waterloo from Woodbridge College in Vaughan, Ontario
  • Computationalism from St. Michaels University School in Victoria, BC
  • Quad Coders from St. Michaels University School in Victoria, BC
On completion of simulation

Congratulations all! These were outstanding performances.

I encourage everyone to learn Smalltalk programming. Smalltalk is a magnificent language, simple, concise, easy-to-learn, purely object-oriented, extremely versatile, most productive, and highly scalable and maintainable. Learn more at smalltalk.tech.blog.

Stay tuned for details about the awards ceremony.

Battlesnake: the Competition

A few years ago, I learned of a programming competition in British Columbia called Battlesnake. It had been covered in the media.

Battlesnake and JRMPC share some common traits. First, they both involve creating a robotic “mind” (Battlesnake calls it an “AI snake”).

Second, they both work off a grid and, at least in later rounds, involve competing “minds” or “AI snakes” on the same grid, tournament-style.

Third, they’re both team-based events, though Battlesnake permits “teams” of one. JRMPC teams must comprise four students.

Fourth, their prize funds are very similar — $15,000 from Battlesnake and $13,000 from JRMPC (this doesn’t include $2,000 in T-shirts).

Fifth, they both involve some luck. Having the best mind or AI doesn’t necessarily guarantee a win.

Where they differ is that the main Battlesnake event is a one-day affair at a physical venue in Victoria, BC (though there are options with limited seats for remote participation). JRMPC is a national event, entirely online, and takes place over five weeks; the actual code execution occurs in our air-gapped computer.

Mission: Impossible

Also, JRMPC is only open to high school students across Canada. There is only one level, whereas Battlesnake has Beginner, Intermediate (no longer available), and Expert levels for students and non-students alike.

And, most importantly, JRMPC is all about using Smalltalk, the greatest programming language in the world. Battlesnake supports multiple languages. (Interestingly, an AI snake has been written in Smalltalk which has done well in previous Battlesnake competitions.)

I won’t say Battlesnake inspired me to start JRMPC, but it’s an interesting coincidink that the two are so similar and started roughly at the same time, 2015.

To be honest, I don’t find Battlesnake very interesting but this is a personal opinion. I think the JRMPC competition is far more imaginative. Battlesnake’s grid is dull and boring. JRMPC’s Islands of Qyzmr, Concentric Treasure, and City Quadrant are cool beyond belief.

Islands of Qyzmr
Concentric Treasure
City Quadrant

In some respects, JRMPC is more challenging than Battlesnake. The competition maps (or grids) are quite complex and robot strategies need to be very sophisticated.

The introduction of Smalltalk to young Canadian software developers is potentially groundbreaking for the IT industry in Canada. Smalltalk will help entrepreneurs and startups deliver IT solutions in a fraction of the time it would take using languages like Python, JavaScript, Java, C#, C++, and PHP.

Major enterprises like JPMorgan, Desjardins, UBS, Telecom Argentina, Siemens, BMW, Thales, Orient Overseas Container Lines, and Communications Security Establishment (Canada’s national cryptologic agency) have been using Smalltalk for years.

Lam Research is worth mentioning. This company is a vital link in the global supply chain. The electronic components in your smartphones, PCs, laptops, etc. started out as silicon wafers fabricated by Lam machines controlled by Smalltalk. You owe your digital existence to Smalltalk!

Canada has the opportunity to lead the world in software development.

Round 4 Results

I am pleased to announce the #1 leading team for Round 4 in The James Robertson Memorial Programming Competition (JRMPC). Congratulations to Team Dijkstra from Centennial Collegiate Vocational Institute in Guelph, Ontario.

This round is special because it’s the first time that competing team strategies play out on the same board simultaneously. It’s a fight to the finish! No quarter is asked and none is given.

Smalltalk Poll 1

JRMPC is The James Robertson Memorial Programming Competition. First Prize is a staggering $6,000. This poll is about the competition.

Promo videos for the competition:

T-shirt design for the competition:

Here’s how the T-shirts look from one of the teams:

The team-based competition involves finding the best strategy in a Pac-Man style game and implementing it in Pharo, a modern variant of Smalltalk. The purpose of the competition is to attract attention to Smalltalk and raise people’s awareness.

Thanks for participating in the poll.

Smalltalk: An Entrepreneur’s Secret Weapon

If you’re an entrepreneur, and especially if you’re a digital entrepreneur, one of your greatest concerns is getting to market as quickly and as easily as you can. Your business is highly dependent on computers, whether that’s in the area of web applications or mobile development or machine learning or virtual reality or robotics or whatever.

At the heart of software development is the programming language. Some languages make your job easier; others make your job much harder. We will look at one particular language that makes your job as a software developer much easier and much more productive than with any other language in existence.

But first, let’s look at a few programming languages that are frequently adopted by startups…

  1. Python — widely regarded as easy to learn and extremely versatile because of its numerous third-party libraries
  2. JavaScript — practically the only language you can use for writing web browser software
  3. Java — the chief Android programming language and the enterprise standard
  4. C# — most commonly used for Windows/.NET programming
  5. Ruby — best known for its Rails web framework
  6. PHP — the most widely used language for dynamic websites

Python has many peculiarities in its design, especially with respect to object-oriented programming. Its multithreading capability is crippled by the GIL (global interpreter lock). Its lambdas are oddly restricted to single expressions. Its half-open intervals are unintuitive. Its off-side rule syntax is offensive to many programmers.

JavaScript has even more peculiarities, especially with respect to weak typing and its myriad nonsensical type coercions. JavaScript code can fail silently. The language is riddled with traps and pitfalls, which is why so many transpiled languages exist as JavaScript alternatives.

Java is extremely verbose. It’s more awkward to use than Python. C# is Java on steroids.

Ruby and PHP have seen better days. Both are in decline.

To be clear, all of these languages can be effective for startups. However, there is one language that offers very special benefits, especially for entrepreneurs on a tight deadline. It’s called Smalltalk.

The first major benefit is Smalltalk’s simplicity and ease of use. Smalltalk is much, much easier than even Python. The syntax is ridiculously simple. It can be learned in its entirety within 15 minutes!

Smalltalk’s total syntax fits on a post card

The second major benefit is Smalltalk’s live coding capability, which practically eliminates the traditional edit-compile-test-debug cycle that has hampered programmers for over half a century. This helps to make Smalltalk the most productive programming language in the world. On average, Smalltalk is twice as productive as JavaScript, C++, Go, Java, PHP, Python, and C#. In many instances, Smalltalk can be up to 5 times more productive!

The third major benefit is Smalltalk’s purity, clarity, and consistency in its object-oriented model. Smalltalk is the easiest object-oriented language for this reason, far surpassing C++, C#, Java, Python, and Ruby.

Smalltalk’s object-oriented nature makes it supremely maintainable and scalable without the headaches imposed by other object-oriented languages.

The fourth major benefit is Smalltalk’s system image. The image is a snapshot of an application’s total execution environment. It allows you to save the execution state of your program and to resume execution later on at your convenience. This is terribly handy.

Smalltalk’s image also makes software deployment a breeze. You never have to worry about installing and configuring the numerous software components (like libraries and frameworks) that constitute your application in production.

The end result is that a startup can minimize the “time to market” for its product. It can deliver the product months, or even years, ahead of its competitors.

The good news is that Smalltalk is every bit as versatile as languages like Python and Java. For back-end web development, you have Smalltalk web frameworks like Seaside and Teapot. For front-end development, you have transpiled languages like Amber and PharoJS.

For data science, you have tools like PolyMath, Roassal, and Moose. For machine learning, you can use TensorFlow and Keras.

Roassal demo

Smalltalk is also good for things like IoT (PharoThings) and robotics (PhaROS) and virtual reality (check out this virtual reality startup).

virtual reality demo

It can even be used for scripting game engines!

game engine scripting demo

Speaking of games, here’s one for mobile devices called HexSolve written entirely in Smalltalk.

I can’t think of anything that Smalltalk hasn’t done compared to Python, JavaScript, and Java.

Conclusion

Smalltalk is a wonderful secret weapon because it flies under the radar of most entrepreneurs. While startups get distracted by the high profile languages, the smart ones can leverage the tremendous benefits of Smalltalk to get well ahead of competitors.

If you’re interested in checking out this magical language, visit the Resources page at my Smalltalk tech blog.

Fuzzy Thinking in Smalltalk

by Lorenzo Schiavina
EDOR Metodi Quantitativi

When I was a professor of Operation Research at the Faculty of Mathematics at the Catholic University of Brescia, I was lucky enough to contact Lofti Zadeh who was going to develop fuzzy logic and I was impressed by his work.

Subsequently I deepened the topic by reading the excellent book by Bart Kosko, Fuzzy Thinking, and I began to get interested into the approach and to convince myself that this technology could certainly be an extension of the models that I was used to implement.

As I have been dealing with computer science for more than 20 years and I was familiar with all the languages ​​and computers of the time and I was lucky enough to be the first in Italy to know Smalltalk, I presented to the ESUG (European Smalltalk User Group), held in Brescia at my University, plans for an extension of Smalltalk classes (FuzzyWorld) that would be able to deal with fuzzy logic.

The first applications that I tried to develop convinced me that the tool offered absolutely unique possibilities and therefore I deepened my research thanks to two exceptional books.

The two books are:

  • Fuzzy Systems Design Principles – by Riza C. Berkan and Sheldon L. Trubatch – ed. IEEE Press
  • Adaptive Fuzzy Systems and Control – by Li-Xin Wang – ed. Prentice Hall

I was fortunate to develop an application for a premier league athletic soccer trainer and the result was excellent: for 3 years in a row, this trainer (moreover of non-top teams) was among those who had the least injuries; his testimony on my contribution was fundamental.

Since then, I have made fuzzy applications in the most diverse fields, integrating fuzzy logic with optimizations through genetic algorithms.

Fuzzy logic is a tool that has been proven useful in dealing with and solving very complex problems; among these, forecasting problems are certainly to be included.

Since in the beginning of my activity I have had the opportunity to deal with investment problems, it seemed very interesting to do an experiment using this type of approach; the application was named FuzzyStock.

I therefore identified (in a completely random way) a stock listed on the stock exchange to verify the results that the use of this (discussed) computer technology could offer me.


The following pages show the data collected and their characteristics:


Synthesis window of the S&P title data used for the experiment

The input information of the experimentation is reported in the 3 areas:

Title (S&P)

o Number of available data (682)

o Date of training surveys (02/01/01 to 24/09/03)

o Size of training data (598)

Processing specifications

This is the fundamental point of the model: the training algorithm (a moving average implemented in fuzzy logic) which was the heart of the system, was applied to data from 1 to 598; the block (i.e. the fundamental training unit) was 9 data, starting with the first available data.

From the experience of analyzing the structure of the first 598 data, the algorithm had to “learn” how to move to evaluate the data from 599 to 682 and demonstrate whether it had “understood” or not how to make predictions; the time interval of the forecast ranged from 28/05/03 to 24/09/03 and the knowledge deriving from the analysis of data from 1 to 598 was applied to this interval

Strategy specifications (demonstration not included)

The strategy specifications identified the elements for simulating the model’s performance (that was not fuzzy oriented):

Buying filter: percentage of growth in the price of the security to make a purchase

Selling filter: percentage of decrease in the price of the security to make a sale

Stop loss filter: percentage of error to decide the abandonment of the chosen strategy (purchase or sale)

Void selling filter: percentage of variation for short selling

Wrong forecasting filter: error percentage for changing strategy (purchase or sale)


The execution of training time of the model is about 6 seconds, after which the result of the forecast is presented:

The result shows both the value of the fuzzy model and the “traditional” one of the trend (the old approach I used), the model of which is shown on the third line of the display; on the fourth, it is possible to indicate a percentage uncertainty assessment to be applied to the reported price that can be entered by a “human” expert.

The response columns are as follows:

  1. Detection date
  2. Lower value of the acceptance interval of the day chosen by the user through the value of probability (90% in the model)
  3. The prediction made by the model
  4. Upper value of the acceptance interval of the day chosen by the user; obviously the value of column 2 and column 4 identify the acceptable price or not; outside the range, the forecast is incorrect
  5. Real price of the day
  6. Forecast error due to exit from the acceptance interval
  7. Forecast provided by the use of the trend model shown on the third row above

On line 6 you can see the indication of out range error (forecast 973.27; real minimum 971.42 i.e. an over estimation).

The data can be stored for subsequent evaluations, brought to Excel or shown.

Using the Show trend button, it is possible to view and graphically analyze the result of the forecast (both fuzzy and trend numerical value in the lower part, where the trend parameters are evaluated):

At the first line the number of last period observations; in red the price of the day; green forecasts for the trend; fuzzy ones in blue

The result of the fuzzy model is particularly interesting (obtainable by disabling the Trend flag) and using a larger series, in this case 50 items):

By eye it can be seen that the maximum forecast error occurred between 20/08 and 7/09; by clicking on the point, you get the detail of the observation:

As you can see, the maximum error (Scarto percentuale) made by the fuzzy approach has a difference of less than 2% of the price.

Pleased, notice that this error was the biggest in the series, excluding a specific case I am going to point out .

It is interesting to note that a terrorist attack occurred in Madrid during the trial period.

Obviously, the result of this event has profoundly influenced the stock market price (and I suppose this was the reason for wrong forecasting).

Of course this event is known to operator, so the processing window had been modified adding the possibility for the human operator to insert his personal evaluation to the forecast, obviously dependent on the external events observed.

Create your website at WordPress.com
Get started