BIOS upgrade Lenovo Flex-14IWL

Earlier this year, I picked up a quad core i5 Lenovo Flex-14IWL with 16G of RAM and loaded it with Pop!_OS.  Everything works great on it except for the fingerprint reader.  I was checking the Lenovo website and discovered that there was a BIOS update available for my laptop.  Unfortunately, the only way to apply the update is to run an application in Windows.  Here's how I got the update done.

Some background

To install Pop!_OS I had to reconfigure the BIOS to disable the Intel RST setting and switch from UEFI boot to Legacy.  Windows 10 and the BIOS updater only run under the UEFI system.

The Windows 10 Install

Having rebuilt quite a few Windows 10 machines I have experience with installing Windows 10 from a USB flash drive.  However, what I was after this time is to install and run Windows from an external drive.  The planned target device was a 500G 7200rpm 2.5" HDD that was put into a USB 3.0 enclosure.  To do this work, I used a Lenovo Thinkpad Yoga S1 running Windows 10.  I was able to follow an article to image Windows 10 using Rufus.   Here is an article that explained how to target an external USB 3.0 HDD with Rufus.  So, key settings were to specify the HDD, use the Windows 10 ISO,  Windows to go installation,  Windows Home selected, and GPT/UEFI format.

Once Rufus finished its work, I copied over the BIOS update file to the external drive.

Windows 10 Install and BIOS update

Get a paper clip.  Bend it open.  With the laptop powered off.  Take the end and insert it in the hole on the right side of the laptop near the power button.  This will give you a menu you can use to get into BIOS settings.  You'll need to switch things back to using UEFI and allow USB boot.  Once that is done, reboot the machine with the external USB HDD plugged in.  It should boot up to Windows 10.  Have fun going through the Windows 10 install.  When drivers finish installing and the machine isn't churning any more, you can go ahead and run the BIOS update you downloaded.  It will first extract the application and then you can run it.  Make sure the laptop is plugged in when you do this.  When it seems like the process is done and you have a black screen, WAIT.  The computer will eventually reboot.  Once, everything has completed you can shut down Windows.  Hold onto the external HDD for possible future updates.

Flipping back

Now, get your paper clip again, disable Intel RST and set to Legacy boot.  Enjoy Linux again.

A day without the smartwatch -- tech experiment

I have a couple of watches that I wore regularly before getting my current smartwatch. The battery in one of them has gone dead and the other uses solar power. So, I keep it out where it can get some light.  Feeling a bit nostalgic, I decided to wear it yesterday.  That meant giving up my "fitness" tracking for the day.... and all of the reminders that go with it.

I found that I was able to do more deep thinking / concentrating work.  The vibrating watch alerts weren't there.  Besides, the fitness tracking, I did miss the awareness of having received a text message.  Overall, I felt like it was a good change up.

Today, when I went back to the smartwatch, I went into my app settings and dialed back notifications on the apps that I felt were the most egregious interruptors.  Overall, this made for a better day today.

What tech experiments can you do in your life?

Presentation Creation Process

Today I was asked how I go about creating a technical presentation.  This is my process.

First, take notes (either in an Engineering Journal or with OneNote) when learning a technology or skill.  Pay attention to your internal questions and to the stumbling points you run across.  After you have learned or acquired the skill reflect and consider what were the important concepts, what mis-conceptions did you have along the way and what could be common problems?

Next, mind map out the topics that you intend to cover in your presentation and consider relationships between the topics.  Sometimes, you may opt to include that mind map with the published materials.  Scapple is a nice straight forward and affordable tool for creating mind maps.

Example Mind Map from d3.js presentation
Then consider the relationships between the content in the mind map.  Think about the presentation order.  Consider if there is a way to frame the material in a story or a give it some context.  Then work on the presentation deck.  Strive to create a deck that has just enough material on the slide to help move the presentation forward.

Then practice.  Practice delivery and timing on your own.  Then try to present the material internally at work, then at a local group(s) and finally at conference(s).  Every time you do a presentation solicit feedback and adapt the presentation.  Sometimes, the presentation has to be adapted real time because of the environment.  A relaxed room of 20 people is very different then a conference hall with several hundred people in it.  By the time you are presenting at a conference you will have invested a lot of time in learning and internalizing the material as well as the presentation.

Experimenting with mongoDB's new $lookup feature

To familiarize myself with the new $lookup feature of mongoDB I did some experimenting.

I tried a couple of different document structures and companion aggregation queries. I based my experiment around the idea of having orders that have keys into related items detail documents.

After seeing the results of some of the aggregations at this point (parallel arrays) I felt like either you'll have to do more manipulation with the aggregation framework to get what you are after, or you'll need to write some code. I think I'd rather just write code. Where the result set out of a SQL join seems smooth, for these types of scenarios the $lookup operator just seems clunky.

In an actual implementation I think I would prefer to see a variant of either of the last two types of documents that includes price in the document. Product prices do change. For example, sale prices, promotions, etc.  Include the price in the order and you won't need to use the $lookup.

Use my code below, posted as a gist, as a jumping off point for your own experimenting.



Working with ethernet


Pre-fabricated Cables and Testing

Start off by grabbing one of the blue cables (mostly CAT6) that you have laying around. They are usually provided when you purchase a router or switch. You’ll use this cable to see the output of the tester when it is hooked up to a good cable. The lights on both parts proceed in linear sequence 1 through 8. Feel free to use these cables to connect between a local switch and devices. Don’t run these cables through the house.
Figure 1. Ethernet continuity tester.  Image source:
http://www.networktechinc.com/nti/images/items/tester-cable.jpg


Wire on the spool

When purchasing the gray/beige CAT 5 or 6 cable at the store, make sure that it is PLENUM rated for running through homes. With these cables, you can read the print on the side of the cable and see a UL
designation.

Crimping

Look at the pre-made cables and Figure 2. Notice that the ordering
of the inner striped Green and striped Blue wires is different than the outer Orange and Brown wires. When inserting the wires into the connector make sure that they are going all the way to the end of the connector. When you crimp, you are pushing little metal teeth into the wire at the very end.


Don’t over trim the cable jacket. It is compressed by a plastic piece during the crimping to help hold everything in place.

The crimper is designed so that when you start crimping it doesn’t release until you’ve compressed everything all the way.

Test that the connector was successfully installed with the continuity tester.


Figure 2.  RJ45 Connector
Image source: http://www.telcodepot.com/images/ricky-cat5e-jack.jpg 

Modular plug crimper


HP DM1 revitalized



A couple of years ago I picked up an HP DM1-3025DX as a fun little affordable Windows 7 portable computer. It came stock with an AMD E-350 dual core processor, an 11" 720P display, a speedy 7200rpm 250G HD, 3G of RAM, web cam, HDMI and VGA output. It also has 802.11n, gigabit ethernet and bluetooth.

Hardware upgrades

I upgraded the computer to 8G of RAM and a Seagate 1TB hybrid drive that I had left over from another project.

Windows 10

I recently upgraded the DM1 to Windows 10. All the devices worked as expected post upgrade. My only complaint was with the background updating. Whenever it was running the CPU and disk usage would spike. This was with the factory HD. I was surprised by how much disk activity there was. With the HD being a 7200rpm drive it should have been fast enough. So, other than being a bit slower than I care for it was an okay experience.

Linux Mint

There were a number of reasons I chose to try Linux Mint on this laptop
  • The just okay performance of Windows 10
  • I already have a powerful Windows 10 laptop
  • I don't have a computer running Linux natively
  • I don't care for the Ubuntu interface
  • I do like the clean Linux Mint Cinnamon UI

The installation

I reset the Windows 10 installation to "new". I then removed that hard disk and replaced it with a Seagate 1TB hybrid drive.

Working on a Windows machine, I downloaded the ISO image from the Linux Mint website Then I picked up a copy of rufus for "burning" the ISO to a USB thumb drive. Next, I had to drop into the CMOS settings and reconfigure the boot order allowing for boot from USB.

Post installation, all of the laptop devices seemed to work properly except for Bluetooth. Research points to this potentially being a problem with this particular release of Mint.

I used a Logitech Anywhere MX mouse with this computer. I had previously paired the mouse and dongle under Windows. I did some research and found that there is software for working with the unifying dongles.

Software Installed on top of the base install

  • Atom w/Markdown extension
  • Google Hangout - has a bug that leaves the camera active post chat
  • cheese - because I needed a way to turn off the camera
  • Flash for Firefox
  • slack
  • mongodb w/developer settings
  • git
  • node.js

Observations

It did seem like the computer took a long time to boot with Mint. However, I've observed the same behavior on other more powerful computers running Linux.

PDF viewing was slow when I was viewing some rather large PDFs of graphic novels. Rendering and scrolling was painfully slow. However, when viewing more "normal" type PDFs like a one page hand out or a 100+ page text the performance was acceptable.

Web browsing and rendering of more complicated sites was slow.

Atom performed acceptably with Python as well as Markdown with preview.

Overall, I found the Linux experience enticing. I feel that I would rather use the laptop with Linux than Windows 10. This configuration is a pretty good balance of a don't worry about it on the go laptop. However, this form factor and sub-optimal performance does leave me longing for a laptop like what I envision the second generation retina MacBook will be like. Although, that will cost significantly more!

Update

Well, while Linux was enticing the overall experience/performance wasn't good enough to keep me hooked.  So, I thought I would continue the experiment and finish off with an apples to apples comparison with Windows.  I did a fresh load of Windows 10 on the Seagate hybrid drive.  This configuration performs much better than the earlier configuration.  I tested the Windows installation with Firefox, Atom.io, node.js, Python, git and mongoDB.  The machine is still not a power house.  However, it is acceptable performance.   Also, the boot time is much faster than it was for Linux.  At least for now, I will be keeping the machine configured with Windows 10.

mongoexport json format UTF-8 characters

So, you just did an export of your mongoDB database into a JSON formatted file called exported.json.  In part, you did this because you have this crazy idea of using the JSON with another application.  Then you see some strange stuff in the URL fields you exported.  Specifically, you see stuff like \u0026 in them.  These are actually UTF-8 codes for the % (percent) symbol.  If you want to work the exported data back around to the stored format, you’ll want to check out Python’s json library.  I’ve included a starting point below.

import json
f = open('exported.json')
for line in f:
    print json.loads(line),
f.close()

Show, don’t tell

I recently read an article about writing techniques that talked about “showing” the reader what was happening versus “telling” them.  An example of telling a story is: “it was bitterly cold outside.”  Or we could show the reader: “I braced myself as I headed outside.  Exiting the building I hear the rope on the flag slapping against the pole.  The straining flag appears to glow with the sun behind it.  My body reflexively shivers when the next wind gust hits.  I chose the wrong jacket.”   This same principle of show, don’t tell can be applied to business and IT. 

As an example, you could say we’re experience great growth year over year or you could show a simple graphic and let people draw their own conclusions.  In this graphic I also draw from the viewpoint of less is more.  There are no axis, scales or excess colors and labels as they don’t bring any value.  The graphic simply shows a value of 20 for 2013 and 40 for 2014.  My challenge to you is to think where you can apply show, don’t tell in your own writing, presentations and applications.

image

Sony Flip 15 upgrade

I have a SONY Flip 15 convertible tablet (SVF15N17CXB) that I use primarily for contract work that requires a PC.  It is a very nice machine with an i7, 8G of RAM and switching discrete/integrated graphics adapter.  When I purchased it in early 2014 the two things it was lacking were an SSD and an active stylus.  I quickly remedied the lack of stylus.  It did come with a 1 TB hybrid fusion drive which I reasoned I would evaluate while SSDs continue to evolve.  I used this configuration for the better part of a year.  I noticed that most often observed slowness came back to I/O bound processes – the hard drive light was flickering a lot and the performance tab in task manager confirmed it.  So, with the last minute renewal of tax credits on business asset purchases I decided to upgrade the machine.

I had originally picked out a Samsung 840 EVO at 512G.  Since then the 850 line up was introduced.  Based on my observed hard drive usage I decided to go with the faster, but slimmer (in capacity) 850 PRO in 256G.

I figured if I am going to go through the work of opening the machine up, I would upgrade the RAM at the same time.  I went with 16GB of Crucial Ballistix that is also faster than the stock RAM.  Since, the hard drive I’m pulling out is a 1TB drive I picked up a USB 3.0 enclosure with UASP support so I can use it as an external drive.

20141230_195310141_iOS

Upgrading the Flip 15 is not for the faint of heart.  It is ultrabookish in form factor.  What that means is no easy access panels.  You get lots of screws with some of them hidden under rubber feet and a cover you have to pry off.  I found the tear down in this video very useful.  My tip is to start prying the cover off by the power connector.  Continue loosening the cover all the way around.  Slide the cover off by moving it away from the head phones connector.

20141231_021332939_iOS

In the picture above you can see the new memory in place in the lower middle of the picture.  The SSD is under the silver and gold colored ribbons in the lower right of the picture.  I did not utilize some of the existing foil/plastic shielding that was on the original case.  It appeared that it was primarily there as an insulator between exposed components on the HDD circuit board and the rest of the machine.  The SSD has no exposed parts.  It an all plastic case.  I did reuse the adhesive wrapper/shield on the bottom portion of the drive as it is also used to secure the drive cable connector.

Since installation of the new parts, the machines performance is much snappier.  Windows 8.1 Pro launches in ~4 seconds from a cold boot.  Development environments start up much faster.  Overall, much less time is spent waiting on the machine.

Today’s digital notebook experience

Let me start at the beginning.  I usually like to start in the middle or at the end, much to the chagrin of friends and family.

We have tried to replicate the notebook digitally—mostly successfully.  Let’s consider a few aspects of the digital notebook experience:

  • The physical manifestation of work.  The lack of the concrete.  The feeling of impermanence.  This can be overcome by making a hard copy.  But that just doesn’t make sense.
  • Instant access.  Today’s technology with instant on tablets and software like OneNote are addressing this.  And now with the cloud we can often access the same notebook from multiple platforms.
  • Search.  In a physical journal we can quickly and intuitively find content.  This seems to be a more difficult task with the digital notebook.  However, with a digital notebook you can use search against handwriting and simulate flipping through pages.
  • Poor vendor marketing of the active stylus.  In my experience, you must have an active digitizer to do good note taking or drawing.  With the exception of Microsoft Surface Pro and Samsung, even when a device has the capability the vendors are failing to identify the feature.  For instance the Sony split and HP Split X2s offers an active stylus option but you don’t really see that marketed well.  On top of that, many people don’t understand the difference between a $40 active stylus and a $5 capacitive stylus from the check out line.
  • Pressure sensitivity.  With the active stylus this has greatly improved.
  • Palm rejection.  This used to be a horrible issue on the dual technology capacitive touch and active stylus systems.  However, this has been mostly resolved.  I’ve used tablets from HP and Sony that this isn’t an issue.
  • The experience of the feeling of the pen or pencil moving across the paper is gone.  There is something magical about the feeling of a pen or pencil on paper.  Today’s active stylus typically has a very slick feel during use.  A long time ago, Cross made a stylus insert for their pens.  This was in the day of Palm Pilots.  It had a really nice feel to it.  It came very close to the feel of pen on paper.  I have seen no modern equivalent.

The digital notebook experience has come a long way.  With the wide spread adoption of tablet computing I really hope we continue to see advancement in the active digitizer field.  I would hate to see the technology lose to the far inferior capacitive touch only stylus.

Spike exploration: sftp, zip, config and Windows Service

I did a spike exploration to find out what is involved in creating a Windows Service with event logging. I also wanted to find out what is involved in working with sftp, zip and configuration with C#.  The code is available on github: https://github.com/k0emt/sftp-windows-service-spike

sftp

In order to test the sftp code I set up a Linux VM in the Azure cloud environment and created a user account on it.

I use the ssh component from http://sshnet.codeplex.com/ for sftp.  It is very straight forward to use this component.  The key for sftp is to use the SftpClient class.  Upload a file with the UploadFile method.  The sample code is in the ConsoleSftp projects Program.cs: https://github.com/k0emt/sftp-windows-service-spike/blob/clean/ConsoleSftp/Program.cs

zip

Use System.IO.Compression for creating/expanding zip files.

To use the ZipFile class, you must reference the System.IO.Compression.FileSystem assembly in your project.

http://msdn.microsoft.com/en-us/library/system.io.compression.zipfile(v=vs.110).aspx

I use ZipFile.CreateFromDirectory in the code above to zip an entire directory before sending it over sftp.

configuration

ConfigurationManager is the class that is used for working with application settings.

http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.appsettings(v=vs.110).aspx

I used it in the service code to pull in a setting called user: https://github.com/k0emt/sftp-windows-service-spike/blob/clean/TransferService/TransferService.cs

In order for this to come together, you must create an app.config file in your project and change the property setting in Visual Studio to tell it to deploy when the project is built. https://github.com/k0emt/sftp-windows-service-spike/blob/clean/TransferService/App.config

Windows service with event logging

Create a Windows Service by choosing the Windows Service project template.

The Windows Service code must be installed and uninstalled.  It is possible to create an installer/uninstaller.  I opted to use the command line for this spike.

http://msdn.microsoft.com/en-us/library/y817hyb6(v=vs.110).aspx

http://msdn.microsoft.com/en-us/library/zt39148a(v=vs.110).aspx

I went here to learn about Service Methods – that is the kind of events to which the service can respond.  You can use the Visual Studio designer to enable the events you want handle.  Then you’ll need to code the events.  For this spike code I have it make an entry in the event log for each event type that is triggered.

http://msdn.microsoft.com/en-us/library/System.ServiceProcess.ServiceBase_methods(v=vs.110).aspx

Installing and Uninstalling the service

http://msdn.microsoft.com/en-us/library/sd8zc8ha(v=vs.110).aspx

Install with installutil.exe TransferService.exe

image

Go to Windows Services to see that the installed service is running.  See, the Spike Transfer Service below.

image

Uninstalling with installutil.exe /u TransferService.exe

image

Event Logging

For event logging a new EventLog is created.  An event source must be created and the source has to be wired up to the EventLog. 

Once this is done, the WriteEntry method can be used for writing to the event log.

You can go to the system event log panel to see where the events have been logged.

image

Summary

Overall, I was pleasantly surprised with the ease of accomplishing the spikes target tasks.  There was also decent documentation and examples available.

Oracle SQL Developer Date/Time format

One of the most super annoying things about Oracle SQL developer is that it defaults to a not so useful (at least to me) date format along the lines of 15-NOV-11.  I prefer to see something helpful like an  ISO 8601 formatted date/time.

The solution is to, in Oracle SQL Developer, go to: Tools > Preferences.

Then in the Preferences dialog, select Database and drill down to NLS.

In the NLS parameters you'll be able to set the Date Format to:
YYYY-MM-DD"T"HH24.MI.SSFFTZR"Z"

I have found that on some systems, you may need to use a setting like:  
YYYY-MM-DD HH24.MI.SS



References:

http://stackoverflow.com/questions/8134493/how-can-i-set-a-custom-date-time-format-in-oracle-sql-developer

http://orastory.wordpress.com/2007/05/15/dates-timestamps-and-iso-8601/