Running MySQL in a Docker container on MacOS

It’s been a while since I’ve run MySQL server on my MacBook Pro (see past notes here , here and more here) and since I got my new M1 MBP I haven’t installed it yet. Rather than doing a native install, I want to run it as a Docker container so I can throw it away easily when I’m done.

Starting MySQL in a Container

From the MySQL Docker page, run:

docker run -p 3306:3306 --name mysql-springboot -e MYSQL_ROOT_PASSWORD=your-root-pass-here -d mysql

The important part here is -p to expose port 3306 in the container as 3306 on the host. This will allow you to connect to localhost:3306 locally to MySQL in the container as if it’s running locally.

Connecting with mysql shell locally

Connect with mysql shell as if the server is running locally:

mysqlsh -u root

and enter the password when prompted. Create a db and setup a user that you use from your app running locally:

create database example;
create user 'exampleuser' identified by 'examplepassword';
grant all on example.* to 'exampleuser'

Increasing font size in menu trees in Eclipse

On a high resolution monitor, by default the tree menus that display your project contents can be too small to read. I’ve never had this issue before on older PCs/laptops/monitors, but on my M1 MacBookPro the text in menu item trees is (for me) too small to read.

The setting to increase the font size specifically for menu trees is in Preferences here: General / Appearance / Colors and Fonts / View and Editor Folders :

Running CSpect ZX Spectrum Next emulator on M1 MacBook Pro

Running CSpect on Windows is pretty much download and go, but on MacOS you need to download some additional support, specifically mono in order to run the Windows .exe on MacOS. This page here, describes downloading mono using homebrew, but when starting it up it would give a segv error and crash. Instead of installing Mono via brew, download and install using the latest .pkg installer from here. It’s possible downloading via brew misses some needed dependencies, but the .pkg installer has everything needed.

To run with the Next rom I downloaded, I used these options:

mono cspect.exe -w3 -basickeys -zxnext -nextrom -mmc=sn-emulator-22.10a.img

As an industry we still don’t know how to effectively transfer ‘experience’ to new developers

New developers start their careers with a limited grasp of the ‘what’, the basics of how to write code in a given language and tech stack, but the deeper understanding of the ‘why’ and how to evaluate potential solutions and pick the most effective solution given known constraints comes much later with experience.

Experienced developers have knowledge of what they’ve seen work and not work from past development projects and can use this knowledge to make educated decisions. Given any problem, having seen multiple solutions applied on past projects allows you to draw from that knowledge of seeing what has worked and not worked and evaluate what solution is the better option when you see this problem again (or something similar).

Experience and knowledge is hard to pass on from one developer to the next. Programming techniques like iteration and conditional statements can be taught and easily learned, but an appreciation of why solution A is more effective than B is harder to convey, usually because the reasons why one solution is better depends on the context and an understanding of the current constraints that you need to work with. Being able to identify what’s important and what is not is a skill that more experienced developers develop over time, but it’s hard to teach.

Experienced developers add obvious value to any project or team, they provide leadership and the benefit of being able to make informed decisions based on their prior experience that lead to better outcomes for the business with a higher degree of certainty (compared to randomly picking a possible solution without knowing if it’s feasible or the most effective option or not).

The problem we have as an industry is that we still haven’t worked out an effective approach for conveying this experience to other new developers. You can gain experience by putting in the time and effort by working on a variety of different software development projects, but there doesn’t appear to be any easy fasttrack approach to package this information and hand to another developer. Can software development experience be ‘knowledge transferred’ to another developer? Maybe not. Maybe you just have to invest the time to gain experience the hard way.

Misunderstanding or under valuing the experience that an experienced developer brings to a team is a common mistake of someone who does not fully appreciate the complexity of software development. All developers are not equal, and one developer cannot be equally exchanged for another. If we can find an effective approach to easily fastrack the passing of experience from one developer to another, this would massively accelerate the growth of new developers, but maybe the reality is experience just has to be gained the hard way.