YouTube Go

In 1985, newly employed with cash to spare, I splurged on a Yamaha CD-X2 CD player. This was long before CDs were established as the heir to vinyl, and at a time when the future of 8-track tapes was still an uncertainty. My first CD was a gift from my roommates - Supertramp’s Breakfeast in America. The last CD I purchased was Beth Gibbons and Rustin Man Out of Season in 2003. In that interval I did my part supporting the music industry by purchasing about 300 CDs which I still own, but rarely listen to.

Today, when interested in listening to music, I usually just call it up on YouTube. The problem is usually recalling the group or song name. To catalog my musical preferences, I wrote an R/Shiny app I call Youtube Go, in honor of Chardonnay Go. The App provides a quick way to add a URL to a “database”, and then query and launch YouTube with a mouse click.

The data file layout is very simple - comma separated values that could be pulled into LibreOffice Calc and edited if necessary.

music-database.csv
1
2
3
4
5
6
7
8
9

genre,artist,title,url
rock,Boston,More than a Feeling,https://www.youtube.com/watch?v=SSR6ZzjDZ94
guitar,David Bolshoy,Sueno en la Floresta,https://www.youtube.com/watch?v=1zyW4-m7L4c
new wave,Talk Talk,It’s my life,https://www.youtube.com/watch?v=5ixRWvrkUHo
summer,John Barry,Walkabout,https://www.youtube.com/watch?v=s5Mf--ykjEU
new wave,Peter Schilling,Major Tom,https://www.youtube.com/watch?v=N1Hs2AQwDgA
new wave,a ha ,Take on me,https://www.youtube.com/watch?v=djV11Xbc914

Here is a view of the query window:

As you come across old favorites or discover new artists, you can easily add the URL to the database through the add tab. Songs are catagorized by genre and artist. Then using the query tab, you can easily recall the song. Since the database is a plain text csv file, errors are easy to correct. To launch the software, create an executable shell script:

~/bin/music.sh
1
2
3
#!/bin/bash

R -e "shiny::runApp(appDir='/home/mbc/syncd/prog/shiny/music', launch.browser=TRUE)"

Code is available on GitHub. You must have R along with the shiny and DT packages installed.

Share

Smalltalk evaluation

I have been working with Smalltalk part time for almost 3 months now. I have read Pharo By Example (some chapters multiple times), Smalltalk-80, Deep into Pharo, Art and Science of Smalltalk, many of the Smalltalk Reports and many Quora and Stack Overflow threads. I have started writing PlateManager in Smalltalk. Here is what I have learned:

Smalltalk pros:

  • Simple understandandable object model
  • Message passing simplifies code and keeps code readable
  • Live programming, debugging very useful
  • The IDE nicely organizes classes and methods
  • Increased productivity? This would be a big win if true, but I do not have enough experience to support nor refute this claim.

Smalltalk cons:

  • No package management. This is a big lose. Prepending classes with 3 letters is a band-aid. Package (namespace) management is a solved problem.
  • No build software. Is it even needed? What about obfuscation, signing, enhancing classes to make them persistant capable?
  • The image. More downsides than upsides. How do I deploy my application?
  • Too much mouse clicking required with the IDE.
  • Small user community
  • Few libraries, especially in bioinformatics
  • GLASS provides a nice integrated package, but you are limited to the provided implementations (Seaside and Gemstone) with no options.
  • Few job opportunities. Smalltalk is not mentioned in a single category in the 2018 Stack Overflow developer’s survey.

I would really like to work with Smalltalk, but the downsides seem significant. I will stick with Java/PostgreSQL. Safe if not adventurous.

Share

Smalltalk Articles

Smalltalk Report

Issue Volume–> 1 2 3 4 5
1 Sept91 Sept92 Sept93 Sept94 Sept95
2 Oct91 Oct92 Oct93 Oct94 Oct95
3 Nov/Dec91 Nov/Dec92 Nov/Dec93 Nov/Dec94 Nov/Dec95
4 Jan92 Jan93 Jan94 Jan95 Jan96
5 Feb92 Feb93 Feb94 Feb95 Feb96
6 March/April92 March/April93 March/April94 March/April95 March/April96
7 May92 May93 May94 May95 May96
8 June92 June93 June94 June95 June96
9 July/August92 July/August93 July/August94 July/August95 July/August96

Instantiation’s articles

  • [How Should Classes Be Initialized?](/lnsDFoKytr/2018/05/16/starticles/class_initialize.pdf)
  • [Class Instance Variables](/lnsDFoKytr/2018/05/16/starticles/ClassInstVars.pdf)
  • [Should Classes Have Owners?](/lnsDFoKytr/2018/05/16/starticles/ClassOwners.pdf)
  • [How to Use Class Variables and Class Instance Variables](/lnsDFoKytr/2018/05/16/starticles/ClassVars&ClassInstVars.pdf)
  • [Constants, Defaults and Reusability](/lnsDFoKytr/2018/05/16/starticles/Constants&Defaults.pdf)
  • [The Dangers of Storing Objects](/lnsDFoKytr/2018/05/16/starticles/DangerStoring.pdf)
  • [Exceptional Power and Control](/lnsDFoKytr/2018/05/16/starticles/Exceptions.pdf)
  • [How to Create Smalltalk Scripts](/lnsDFoKytr/2018/05/16/starticles/FileinScripts.pdf)
  • [How to Manage Source without Tools](/lnsDFoKytr/2018/05/16/starticles/ManageSource.pdf)
  • [Don't Use Arrays?](/lnsDFoKytr/2018/05/16/starticles/MisuseOfArrays.pdf)
  • [How Should Teams Organize their Applications?](/lnsDFoKytr/2018/05/16/starticles/OrganizingTeams.pdf)
  • [Techniques for Platform Independence](/lnsDFoKytr/2018/05/16/starticles/PlatformIndepdendence.pdf)
  • [Pools: An Attractive Nuisance](/lnsDFoKytr/2018/05/16/starticles/Pools.pdf)
  • [Return Values](/lnsDFoKytr/2018/05/16/starticles/ReturnValues.pdf)
  • [Creating Subclasses](/lnsDFoKytr/2018/05/16/starticles/Subclassing1.pdf)
  • [Extending the Collection Hierarchy](/lnsDFoKytr/2018/05/16/starticles/Subclassing1.pdf)
  • [A Smalltalk Virtual Machine Architectural Model](/lnsDFoKytr/2018/05/16/starticles/VMArchitecture.pdf)

Miscellaneous

Object Behavior Analysis and Design

Share

Pharma Productivity

More disappointing news concerning pharma productivity:

Given the poor success rates of compounds making it out of clinical trials, the poor efficacy of those on the market, and the realization that most breakthroughs are bullshit, I can only conclude that we are in the business of extracting money from insurance companies and patients.

Share

health

Prescription drug alternatives

Share

Micro Services

A contrarian’s (with vested interests) view

Trulia switches to “Islands”

Why Doctors hate their computers Feature creep; the “Tar Pit”

Proprietary IT give big companies their edge.

Microservices as innovation enablers best practices == common practices

Split the monolith

Now, don’t get me wrong. It was architected in multiple tiers, and those tiers had many components in them. But they’re all very tightly coupled together, where they behaved like one big monolith. Now, a lot of startups, and even projects inside of big companies, start out this way. They take a monolith-first approach, because it’s very quick, to get moving quickly. But over time, as that project matures, as you add more developers on it, as it grows and the code base gets larger and the architecture gets more complex, that monolith is going to add overhead into your process, and that software development lifecycle is going to begin to slow down.

Rob Brigham, Amazon AWS senior manager for product management

Share

GsDevKit

After reading an article evangelizing smalltalk, learning that it is a pure OO language, and works on top of GemStone, I decided to give it a try. I follow the GemTalk Systems installation instructions which are essentially:

1
2
3
4
5
6
7

git clone https://github.com/GsDevKit/GsDevKit_home.git
cd GsDevKit_home
. bin/defHOME_PATH.env # define GS_HOME env var and put $GS_HOME into PATH
installServerClient
createStone devKit_33 3.3.0
createClient tode1

I am running on Debian 9.3 which is not supported so a few hacks were required.

modify .bashrc

.bashrc
1
2
3
4
5

.....
export GS_HOME=~/GsDevKit_home
export PATH="/home/mbc/bin:$GS_HOME/bin:$PATH"
.....

Change OS recognition. Note - this may invalidate all warranties!
One of the scripts called is ~/GsDevKit_home/bin/utils/installOsPrereqs

Look for the method installPrereqsForDebian() and change testing | 8.3 to 9.3:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
installPrereqsForDebian(){
case "$osVersion" in
testing | 9.3)
sudo dpkg --add-architecture i386
installUbuntuPackages
sudo apt-get -y install fonts-dejavu # ensure that DejaVu Sans Mono font present (default font for tODE)
sudo ln -f -s /usr/lib/i386-lin-gnu/libstdc++.so.6 /usr/lib/i386-linux-gnu/libstdc++.so
;;
*) usage; exit_1_banner "unrecognized Debian version $os";;
esac
}



To get started with tODE:

1
2
3
startStone -b devkit_33
startClent tode1

‘stones’ command in the terminal will show running stones
‘testLogin’ in tODE will confirm connection

Share

Walls Work

Good fences make good neighbors

EU pays for Turkey’s wall with Syria

Walls work

Walls can be 100% effective

Using an estimate of $6 billion for a border wall with Mexico we could have built 25 walls with the $150 billion obama gave to Iran.

The US gives $45 billion per year in aid to African countries - 7 more walls.

We need to stop debating the cost or effectiveness of walls. They are effective and affordable. What needs to be debated is whether the US has the resolve to protect its borders.

Share