Showing posts with label developer. Show all posts
Showing posts with label developer. Show all posts

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.

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.

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/

Engineer's Notebook

I record daily activities, notes, thoughts, diagrams, ideas, some reference material and special insights in their own paper notebooks.  If you were going to jot something down on a scratchpad, put it in here.  Document who you were collaborating with.  Why?  When I am in stand up meetings or talking with customers I go the paper route because I can simply open up the journal and write.  Also, it is less intimidating and error prone than having a computer between you and the people you’re talking with.

Use a pen.  Erasing and re-writing is too much work and will slow you down.  Simply, draw a line through the erroneous material and continue on.

When it comes to choosing a paper journal it is a very personal decision.  Many people like the Moleskine line of journals.  Ecosystem makes similar more colorful journals of the same format.  The things to consider when choosing a journal are:
  • Size.  Will I have it with me when I need it?
  • Do I want one that lays flat?
  • Does it utilize a closure of some kind?  Will it be a pain to open and close?
  • Does it have a pocket in the back for small papers?  Do I care about that?
  • Do I want plain, ruled or grid paper?
  • Do I want a few pages or lots of pages?
Personally, I use a journal that is made by Miquelrius.  It is about 6 inches wide by 8 inches tall and about an inch thick.  It has rounded corners and the pages are grid ruled.  Having the grid rule makes it easy to sketch out design ideas.  Another nice thing about this page size is that you can easily “scrapbook” in index cards or ever so slightly trimmed down print outs.
  
Create a margin on the outside of every page.  Put a date in the margin when you start a new entry.  You may want to add the time as well.  Some days there isn’t much to note and I’ll continue on the page with the next day.  In that case I draw a horizontal line between days to make it more visible.  The margin can be used for icon style call outs, indicating action/todo items, work partners, work times and post activity summaries or thoughts.

It is my experience that page flags get caught on things and torn up.  Bookmarks fall out and get lost.  Therefore, I recommend using Book Darts—small metal pieces that can be used to mark your page and point to a specific line.
With so many thoughts and notes recorded in your journal you’ll want to add your contact information inside the front cover with an offer of reward if returned.

I’ve experience quite a few benefits from keeping this journal.  For example:
  • Meeting action items and decisions documented and easily formally distributed.
  • Look at back at project notes from years ago and see what was done and why.
  • Able to reproduce work flow for prior infrequent work.
  • Able to identify collaborators for project work.
  • Identify when software was installed on a machine and what versions.
OneNote
For long term, shared electronic notes I utilize OneNote.  It is available on a wide variety of platforms now.  Notebooks can be local only on some platforms or synced to the cloud.  It lets you bring together your project notes into a portfolio style view.

OneNote provides numerous ways for getting information into it:
  • Typed and handwritten notes (it supports inking!)
  • Custom screen capture feature
  • Insert a picture from a file or camera!  (Use the camera to bring in notes from your journal.)
  • On Windows OneNote can OCR your inked writing, handwriting or print inside of images for search.
  • Print to OneNote
  • Drop in documents
  • Link to web pages
  • Voice notes
  • Drawings by hand and assisted
Compartmentalize
I would also suggest that you not use a single journal for all your needs.  Use one for work, one for the research you do outside of work.  In addition, consider a free form journal for capturing personal thoughts, events and accomplishments.

Summary
There are many good reasons to start and maintain an Engineer's Notebook.  Get a journal today and start the habit!

Git Reference

Git community book online: http://book.git-scm.com/index.html
creating:init, branch
adding and removing files::add, rm
seeing activity:log, status
basic repository operations are: push, pull, commit, checkout, clone, fetch, merge
undoing changes: reset, checkout, revert
see files in the repo:ls-files
finding stuff:grep
labeling:tag


Some git cheat sheets:
http://help.github.com/git-cheat-sheets/
http://cheat.errtheblog.com/s/git

How do I see the differences between file versions?
git diff <commit hash> <filename>

How do I go back a to version x?
Then to revert a specific file to that commit use the reset command:
git reset <commit hash> <filename>

You may need to use the --hard option if you have local modifications.
A good workflow for managaging waypoints is to use tags to cleanly mark points in your timeline. I can't quite understand your last sentence but what you may want is diverge a branch from a previous point in time. To do this, use the handy checkout command:

git checkout <commit hash>
git checkout -b <new branch name>


You can then rebase that against your mainline when you are ready to merge those changes:
git checkout <my branch>
git rebase master
git checkout master
git merge <my branch>


How do I find/look at a files history (log)?
git log <filename>
http://book.git-scm.com/3_reviewing_history_-_git_log.html

Using --stat with log will show what files changed and by how much.
git log --stat

There is also a --pretty option that provides several nicer ways of presenting the results
git log --pretty=oneline
git log --pretty=short
git log --pretty=format:'%h was %an, %ar, message: %s'


You can also use 'medium', 'full', 'fuller', 'email' or 'raw'. If those formats aren't exactly what you need, you can also create your own format with the '--pretty=format' option (see the git log docs for all the formatting options).

How do I roll back/throw away current changes?
Use checkout if you haven’t committed yet.
$ git checkout -- hello.rb
$ git checkout HEAD hello.rb

http://book.git-scm.com/4_undoing_in_git_-_reset,_checkout_and_revert.html

Use revert to fix committed mistakes.

You have to be careful when you say "rollback". If you used to have one version of a file in commit $A, and then later made two changes in two separate commits $B and $C (so what you are seeing is the third iteration of the file), and if you say "I want to roll back to the first one", do you really mean it?
If you want to get rid of the changes both the second and the third iteration, it is very simple:

$ git checkout $A file

and then you commit the result. The command asks "I want to check out the file from the state recorded by the commit $A".
On the other hand, what you meant is to get rid of the change the second iteration (i.e. commit $B) brought in, while keeping what commit $C did to the file, you would want to revert $B

$ git revert $B

Note that whoever created commit $B may not have been very disciplined and may have committed totally unrelated change in the same commit, and this revert may touch files other than file you see offending changes, so you may want to check the result carefully after doing so.

Disclaimer: I created the layout of this document, along with the questions I wanted answered for myself.  The answers are gleaned and lightly edited from results I found during the research process.  Quite a few answers were found on
stackoverflow.com