Categories
Blogmarks Culture First Engineering Software Engineering

Endorsing and regretting technical decisions

This post from Jack Lindamood has a format I loved. The decisions and his reflections are interesting, but I think less interesting than the format itself. What I love:

  • You keep track of all the big decisions you’ve made during your tenure in a particular company / role
  • You engage in self reflection on if they were good or bad choices, after you’ve had time and benefit from hindsight
  • You share knowledge with the community (I was exposed to tech I’ve never heard of, and had new takes on tech I use every week)
  • If we had one of these for Culture Amp, it would go a long way to clarifying not just why we use a certain tech, but if we still like it, separate from the decision of if we’re still using it.

At Culture Amp we do use a tech radar that mimic’s the format from Thoughtworks. But the “radar” UI doesn’t lend itself to reading as a whole.

I also like that he’s captured the decisions he’s been accountable for as an engineering leader. That’s fascinating when thinking about recruiting – how do you convince a new company that you’re going to be a leader with good judgement? And how does the new company evaluate if the way you make decisions – and learn from mistakes – is the right fit for them?

(Almost) Every infrastructure decision I endorse or regret after 4 years running infrastructure at a startup · Jack’s home on the web

Categories
Software Engineering

Tricks I needed to install Fedora 26 on a Dell XPS 13 9365 (2 in 1)

Update: I ended up getting a new job which came with a new laptop, so don’t have the XPS 9365 anymore. I hope this post is still helpful to people but I won’t be able to provide any more support. The official Fedora support page is over here: http://ask.fedoraproject.org/ Good luck everyone!


While having breakfast on Friday morning, my 5 year old laptop was going fine.  Then Firefox froze.  I pressed alt-tab, nope, everything is frozen except the mouse. Then the mouse was frozen.  Then I reset the computer, and got this message “Operating System Not Found”.  My hard drive had died.

Rather than spend a weekend fiddling to repair it, I decided to spend my tax-return money to buy a new laptop – a Dell XPS 13 9365 2-in-1.  Fancy as!  But, whenever you buy a fairly knew and fancy laptop, less than 12 months old, with the intent to install Linux – you should probably set aside some time because you just know there’s going to be issues.

One weekend later, I’m the happy owner of a XPS 13 2-in-1 running Fedora 26.  Here’s all the tips and gotchas and cry-into-a-pillow moments that I had to get through to make it this far.

Trying Fedora instead of Ubuntu

Before I made the purchase, I was doing some Googling to see if Ubuntu would even load on an XPS 13 9365.  The verdict seemed to be that it would load, but there was some difficulty getting suspend/resume to work, but it was possible.  I decided to go ahead with the purchase. But in my reading, I came across this comment:

I was unable to uninstall Ubuntu on the XPS at all. And out of frustration I tried Fedora and I was simply BLOWN away by the polish. And today we have Fedora 26 that is even better. I am semi-validated by Ubuntu moving to Gnome as well. Ubuntu was simply too unpolished with Mir + Unity.

I decided to give Fedora a go.  Now that most of my development work happens in Docker, I’m not too worried about which distro I have running on bare-metal – and I’m up for trying something new!

Verdict: I’ve enjoyed Fedora – the polish in Fedora 26 really is there compared to Ubuntu 16.04 (admittedly – it is 12 months newer so that is to be expected).

To get started with Fedora, download the “Fedora Media Writer” which will prepare a Live USB for you. See the Fedora installation guide for more info.

Shrinking a Windows Partition is beyond my pay-grade

At first I was interested in keeping Windows 10 installed and dual booting, because it might be nice to occasionally see test how it works etc.  But part of the dual-boot process involves resizing the Windows partition to make space for Linux.

I had a 460GB Windows partition, with 30GB used.  For the life of me I couldn’t shrink it smaller than 445GB – leaving only 15GB for Linux.  I tried following different tips, tricks and tutorials for about 30 minutes, and then decided that I’ve lived without Windows for a decade, I can keep going without it now.

SATA mode has to be AHCI

By default the 9365 has it’s SATA hard drive configured to be in “RAID” mode rather than “AHCI”.  To be able to install Fedora, I needed to change this to AHCI. Not sure why.  Here’s a question / answer that prompted me to make the change.

It’s worth noting that if you intend to dual boot, changing from “RAID” to “AHCI” can cause serious problems for Windows unless you do some prep work first.  You can change it and change back, but if you want to dual boot, you will need both to be on AHCI.

A painful firmware bug (that makes you think your laptop is dead forever)

See: http://en.community.dell.com/support-forums/laptop/f/3518/t/20009547

This bug had me thinking my laptop was bricked and would need to be sent for warranty.  It would literally sit on the DELL logo for what felt like forever, but turned out to be 5 to 10 minutes.  I can’t explain how relieved I was to read a blog post where someone described the same symptoms:

When changing the SATA drive setting from RAID to AHCI, and disabling the “Secure boot” option in the BIOS (both actions are needed to install Ubuntu), the booting process gets stuck in the Dell logo for a long time, around 5 minutes, before it makes any progress. Even trying to enter the BIOS again to change those settings makes me have to wait that long.

Also, when booting when those settings on and entering the BIOS, the whole user interface of the BIOS menu, even just moving the mouse cursor around, is extremely slow. Clicking on a menu option on the BIOS makes the screen refresh to the next screen with a very slow transition of about 3 seconds.

I’m have upgraded to the latest BIOS firmware as of April 8, 2017 (Version 01.00.10, 3/9/2017). This bug is currently preventing me from setting up a dual-boot mode with Windows 10 + Ubuntu, which makes the system not usable for my specific use cases. I’d really appreciate if these issues could be resolved soon.

The fix:

  • You can’t have “SATA MODE = AHCI” and “SECURE BOOT = FALSE” at the same time.
  • Because “SATA MODE = AHCI” is required for a Fedora install, we need “SECURE BOOT’ to be true.  Turns out, this is actually okay.

That one hurt.  I also found a poor user on Reddit who was bit by the same problem and was offering money to anyone who could help – too bad I didn’t find the fix 2 months earlier!

Configuring BIOS to boot from USB

One final thing to do in BIOS: configure it to boot from USB.

Because we’re using SecureBoot, this is not as straight forwarded as choosing an option from a boot menu.

Steps:

  • Ensure “Disable Legacy Boot ROMs” is ticked.  It will need to be ticked for secure-boot to be ticked.
  • Ensure “Secure Boot” is ticked.  It’s on a different page in the settings.
  • Ensure “Boot mode” is “UEFI” not “Legacy”.
  • This will show a list of boot options.  The terrible GUI interface will require you to scroll down to find the “Add Boot Option” button. Click it.
  • Add a boot option named “Fedora” and click the “…” to open the file browser.
  • Find your USB drive in the list (mine was named “Anaconda” by the Fedora Media Writer).
  • Load the file “/EFI/BOOT/grubx64.efi
  • Save the new boot item.  Use drag and drop to move it to the top, so it has the highest priority.
  • Save your settings, and restart – and hopefully – Fedora will load up and kick into Live CD mode.

Before you install

Before I hit install, I did a quick check:

  • Wifi works: yes
  • Sound works: yes
  • Touchscreen works: yes
  • Webcam works: yes
  • Suspend / Resume works: no. Bummer – but my research had suggested this was probably going to be an issue, so I continued anyway.

In the install options I deleted the Windows 10 partition, and got it to auto-partition from there.  Then hit install.  Woo!

Getting suspend and resume to work.

**Update:** It turns out I’m still having supend/resume issues.  I think figuring out how to install the 4.13 version of the kernel while SecureBoot is enabled is what I will need.

After the install, almost everything worked as expected, and the whole experience was really nice – it’s a beautiful laptop, and the new version of Fedora with Gnome 3 is quite pleasant.  Until you close the lid and it suspends.  Because then it won’t wake up again.

What would happen:

  • The screen would go dark, but the keyboard backlight would stay on.
  • Pressing the tiny power button on the side of the case does nothing at first.
  • If you keep holding the power button for like 10 seconds, the login screen lights up, and everything is still there, but the moment you let go, it suspends again.
  • If you hold it down long enough, it eventually turns off.  You’ll need to do this to get out of the broken suspend, but it takes forever and feels like you’re pressing the little power button so hard you’ll break it.

What I learned about why it doesn’t work:

  • It’s a Linux kernel issue.  See this bug report.
  • You can check your kernel version by typing
    [jason@jasonxps enthraler]$ uname -a
    Linux jasonxps 4.11.8-300.fc26.x86_64 #1 SMP .....
  • I read a bunch of Q&A suggestions on tips for getting this to work, but none helped that much – reading through the bug report above though convinced me that I needed to upgrade from 4.11 to 4.12 or 4.13.
  • Upgrading to the very latest kernel (4.13-rc4) seems easy, but as the wiki page notes, it won’t work with SecureBoot – so that turned out to be a dead end for me.  (Signing the kernel for SecureBoot might be possible, but I couldn’t be bothered learning enough to understand the tutorials).
  • 4.12 isn’t released yet, but it’s supposed to be in testing.  Unfortunately, enabling the “updates-testing” repository and running “dnf upgrade” didn’t install the new kernel.  I’m not sure if it was supposed to.
  • In the end, I installed 3 RPMs manually.  (GASP!)
  • Here is the page with the packages I need.  Apparently it’s only been in testing for 9hours – perhaps that is why it wasn’t coming through the update channel?
  • I had to download these 3 files:
  • Once downloaded, I ran this to install them:
    dnf install kernel-modules-4.12.5-300.fc26.x86_64.rpm kernel-core-4.12.5-300.fc26.x86_64.rpm kernel-4.12.5-300.fc26.x86_64.rpm

    Be careful here that you don’t override the kernel you’re currently using.  You may need to add options to “dnf” if it suggests that it’s going to remove the package for the kernel you’re currently on.

  • And then you update grub:
    sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
  • After restarting, test that the new kernel is working:
    [jason@jasonxps enthraler]$ uname -a
    Linux jasonxps 4.12.5-300.fc26.x86_64 #1 SMP ...
  • And now, you can close the lid and expect it to suspend and resume.  For me, I still have to hold the power button for like 6 seconds to get it to resume, but hey, at least it comes back.  I’m hoping 4.13 will come out and fix that problem too.
  • Note – I also changed the setting in Gnome Power Settings for “When the Power Button is Pressed” from “Suspend” to “Nothing”.  Reason: sometimes holding down the power button that long to resume it would then trigger another “supsend”.  So I set the button to do nothing.  I can just close the lid to supsend.

Ubuntu Unity-like keyboard shortcuts

Overall I’ve really enjoyed Gnome 3 over Ubuntu Unity.  One thing I missed though was being able to press “Win+1” to open my file manager, “Win+2” to open Firefox, “Win+3” to open Visual Studio Code, “Win+4” to open Chrome etc. Basically, my most common applications all sit in the dock on the left, and I can use a quick keyboard shortcut to switch to that app – and if it’s not open already, it will open it.  Gnome doesn’t have this by default.

Luckily, there’s an extension that adds this behaviour: https://github.com/franziskuskiefer/app-keys-gnome-shell-extension

Conclusion

Well, that was certainly not something I’d trust my Grandma to complete successfully.  But hey – at least it works.  If I learn any new tricks for getting Fedora to run nicely on a Dell XPS13 9365 2-in-1, I’ll post here.

If you have any questions, feel free to ask – no guarantees I’ll be able to help though :)

 

Categories
Edtech

Long Term Thinking

Here’s another thought provoking quote from Peter Thiel’s Lectures (or Blake Master’s notes on Peter’s lectures):

But there’s an alternative math metaphor we might use: calculus. The calculus metaphor asks whether and how we can figure out exactly what’s going to happen. Take NASA and the Apollo missions, for instance. You have to figure out where the moon is going to be, exactly. You have to plan whether a rocket has enough fuel to reach it. And so on. The point is that no one would want to ride in a statistically, probabilistically-informed spaceship.

Peter Thiel’s CS183: Startup – Class 1 Notes Essay

It’s been a long time since I did Calculus in high school, but I remember the task of taking multiple points and applying a gradient or a curve to them: you looked for a pattern, developed an equation and you used that to guess at where future points might show up.

While at the moment I have two projects I’m working on (Enthral.us, and OurSchoolDiary), long term, there’s so much room for expansion. Seth Godin in his book Purple cow talks about how after a product has been developed and reach critical success, it’s crucial for the inventors to move on, and leave maintaining and “milking” the product for a team that’s better at maintainance. An inventor will just keep trying to break stuff – better to get them developing the next big hit.

Trends and Opportunities

So if I try to think long term, till after these projects, what trends do I see? And what opportunities do these open?

  • Decreasing price of technology (trend) -> Availability in developing world (opportunity)
  • Digital connectedness is increasing (trend) -> not being in the same physical space (or even the same point in time) as your teacher will seem less weird (opportunity)
  • Availability of stored content approaches infinite (trend) -> Every niche in content, and every variety in learning styles (or media types) can be catered to. (opportunity)
  • Computer profiling approaches scarily accurate (trend) -> Career / Interest prediction, based on passion, not assessment grades. (opportunity)
  • Ability to track behaviour, A/B testing procedures get really powerful (trend) -> Get statistics on the actual best practices for teaching – which way of teaching content is the most accurate? Improve the pedagogical effectiveness of your materials through data analysis. (opportunity)
  • IT specialist tools become more user friendly, accepted by other industries (trend) -> The incredible power of Git, and Github in particular, to co-ordinate teams of creators could be utilised in the creation (and modification) of educational media.

Planning to be “ahead of the game”

Given these trends, and the likely opportunities that will develop, can I position my products to be embracing these trends just as they hit critical mass?

Just a few thoughts:

  • Be working on a “normal person friendly” interface to GIT – possibly changing mental models / system models to match.
  • Don’t tie to a single platform – with the rise of the developing world, there is a high chance that the current big players (Apple, Samsung, Microsoft etc) will not carry over. New markets = new giants. So plan software and media that can adapt.
  • Get as much experience with A/B testing as possible, so that I can transfer those skills to educational media later.
  • Find teachers who are willing to experiment with out-of-class teaching, and work with them to pioneer online lessons.
  • etc…

Admittedly, these trends/predictions are not very long term. Most will probably be well underway within 5 years, some will be underway even sooner. Still, it’s a useful exercise, and thinking 5 years ahead of the competition is still better than chasing the competition. A good exercise to revisit.