<?xml version="1.0" encoding="utf-8" ?><?xml-stylesheet type="text/css" href="https://www.earthli.com/resources/styles/rss.css" ?><rss version="2.0">
  <channel>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>earthli News 3.7</generator>
    <language>en-us</language>
    <ttl>720</ttl>
    <title><![CDATA[Tips &amp; Tricks &gt; earthli News 3.7]]></title>
    <link>https://www.earthli.com/news/</link>
    <pubDate>Wed, 10 Jul 2019 21:35:20 +0200</pubDate>
    <lastBuildDate>Wed, 10 Jul 2019 21:35:20 +0200</lastBuildDate>
    <image>
      <link>https://www.earthli.com/news/</link>
      <title><![CDATA[Tips &amp; Tricks &gt; earthli News 3.7]]></title>
      <url>https://www.earthli.com/news/icons/webcore_png/app/news_100px.png</url>
    </image>
    <description><![CDATA[Tips for using software of all kinds.
]]></description>
    <copyright><![CDATA[Copyright (c) 1999-2026 earthli.com. All Rights Reserved.]]></copyright>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3768</guid>
    <title><![CDATA[Source Link Flakiness in Visual Studio 2017 and 2019]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3768</link>
    <pubDate>Wed, 10 Jul 2019 21:29:53 +0200</pubDate>
    <description><![CDATA[Published by marco on 10. Jul 2019 21:29:53
Updated by marco on 10. Jul 2019 21:35:20
------------------------------------------------------------------------

"
tl;dr: If MSBuild/Visual Studio tells you that <error>the value of
SourceRoot.RepositoryUrl is invalid...</error> and you have no idea what it's
talking about, it might help to add the following to the offending project and
the error becomes a warning.

""

 
<PropertyGroup>
  <EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
</PropertyGroup>

[What is Source Link?]

Microsoft introduced this fancy new feature called Source Link that integrates
with NuGet servers to deliver symbols and source code for packages.

This feature is opt-in and library and package providers are encouraged to
enable it and host packages on a server that supports Source Link.

[Debugging Experience]

The debugging experience is seamless. You can debug into Source-Linked code with
barely a pause in debugging.

The only drawback is that you don't have local sources, so it's trickier to set
breakpoints in sources that haven't been downloaded yet. When you had local
sources, you could open the source file you wanted and set a breakpoint, knowing
that the debugger would look for the file in that path and be able to stop on
the breakpoint.

Also, Visual Studio's default behavior is to show all debugging sources in a
single tab, so you don't even have all of the files open that you looked at when
your debug session ends. If you hover the tab, you can figure out the storage
location, but it's a long and not very intuitive path. Also, it only contains
the sources that you've already requested.

Still, it's a neat feature.

[Getting Pushy]

However, Microsoft is doing some things that suggest that the feature is no
longer 100% opt-in. The following error message cropped up in a project with
absolutely no Source Link settings or packages. It doesn't even directly use
packages that have Source Link enabled (not that that should make a difference).

[image]

There are actually three problems here:

   1. The compiler is complaining about Source Link settings on a project that
      hasn't opted in to Source Link.
   2. The compiler is breaking the build when Source Link cannot be enabled as
      expected.
   3. The error/warning messages are extremely oblique and give no indication
      how one should address them. (Another example is the warning message shown
      below.)

It's the second one that make this issue so evil. The issue crops up literally
out of nowhere and then prevents you from working. The project builds. Even if I
wanted Source Link on my project but it wasn't set up correctly, this is no
reason to prevent me from running/debugging my product.

And, honestly, because of reason #3, I'm still not sure what the actual problem
is or how I can address it with anything but a workaround.

Because, yes, I found a workaround. Else, I wouldn't be writing this article.

[Things that Didn't Work]

The first time I encountered this and lost hours of precious time, I "fixed" it
by removing Source Link support for some packages that my product imports. At
the time, I thought I was getting the error message because TeamCity was
producing corrupted packages when Source Link was included. It was not a quick
fix to open up a different solution, remove Source Link support and re-build all
packages on CI, but it seemed to work.

Upon reflection and further reading, this is unlikely to have been the real
reason I was seeing the message or why it magically went away. Source Link
support in a NuGet server involves having access to source control in order to
be able to retrieve the requested sources.

It's honestly still unclear to me why Visual Studio/MSBuild is complaining about
this at build-time in a local environment.

[The Workaround]

Today, I got the error again, in a different project. The packages I'd suspected
yesterday were not included in this product. Another, very similar product used
the exact same set of packages without a problem.

Even though the issue "Using SourceLink without .git directory"
<https://github.com/dotnet/sourcelink/issues/159> isn't really the issue I'm
having, I eventually started copying stuff from the answers into the project in
my solution that failed to build.

Add the following to any of the offending projects and the error becomes a
warning.

 
<PropertyGroup>
  <EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
</PropertyGroup>

[image]

The ensuing warning? I can't help you there. I threw in a few other directives
into the project file, but to no avail. I'm not happy to have a compile warning
for a feature I never enabled and cannot disable, but I'm hoping that Microsoft
will fix this sooner rather than later.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3675</guid>
    <title><![CDATA[Docker for Windows and Hyper-V]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3675</link>
    <pubDate>Sun, 20 Jan 2019 21:46:27 +0100</pubDate>
    <description><![CDATA[Published by marco on 20. Jan 2019 21:46:27
------------------------------------------------------------------------

As it stands, "Docker for Windows"
<https://docs.docker.com/docker-for-windows/install/> still requires Hyper-V to
be enabled on the host machine. If you've been around long enough, you may still
believe (falsely, it turns out) that Hyper-V doesn't work with hyper-threading.

The problem with Hyper-V was apparently never that it disabled hyper-threading
but that it led to sub-optimal cache-usage on older chips (single-core). Newer
chips have many more cores and much larger caches, so the cache-poisoning issue
from 2005 is no longer a problem. 

There are still some issues because the core-virtualization of hyper-threading
can also conflict with the virtualization of Hyper-V, but opinions differ on
whether turning off hyper-threading is an improvement. 

Read "Hyper-V and Hyper-threading: On or off?"
<https://serverfault.com/questions/47411/hyper-v-and-hyper-threading-on-or-off>
and "Use Hyper-Threading with HyperV?"
<https://www.360ict.nl/blog/use-hyper-threading-with-hyperv/> for more
information and analysis.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3664</guid>
    <title><![CDATA[Repairing Windows Updates that refuse to install]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3664</link>
    <pubDate>Sun, 20 Jan 2019 21:45:24 +0100</pubDate>
    <description><![CDATA[Published by marco on 20. Jan 2019 21:45:24
------------------------------------------------------------------------

[image][image]For quite some time now (months?), my Windows 10 installation has
had a problem/corruption in its Update Database that prevented it from applying
some updates.

At first, it was just a definition update for Windows Defender, which is bad
enough. However, a recent update to Windows Defender itself could not be applied
and this conflict prevented Windows from even starting Windows Defender
Antivirus.

That's not great.

[Finally: A Solution]

Digging around online in this problem area is complicated by the fact that there
are so many Windows users and so many versions and so many configurations. Many
users offer advice when they don't know what they're talking about. A lot of
threads quickly devolve into "I re-installed Windows and the problem went away".

Well, duh. If the muffler falls off of your car, technically you can solve that
problem by buying a new car. I'm just not interesting in the nuclear option; it
costs so much time and effort. At Encodo, we have a base image, but it still
takes time to get everything back to where it was.

After keying in the KB ID (Knowledge Base ID) of the update and searching a few
threads, I finally landed on "Windows Defender update KB4052623 has been failing
to install with error 0x80070643 for months"
<https://answers.microsoft.com/en-us/windows/forum/windows_10-update/windows-defender-update-kb4052623-has-been-failing/3555d9b1-006f-4dc7-b445-3368aa4daf06>,
which is an accurate description of my issue. That was encouraging.

Lower on the page is a comment that recommends using the "Windows Update
Troubleshooter"
<https://support.microsoft.com/en-us/help/10164/fix-windows-update-errors>, a
tool I'd never heard of before. It does what it advertises, at least for me. [1]

That the feedback contained two errors, one of which the tool couldn't repair
wasn't encouraging, but after a restart, Windows Update was up-to-date and
Windows Defender was running again.

[image][image][image]

--------------------------------------------------------------------------------


[1] The poor soul who wrote "KB4052623 (Version 4.16.17656.18052) - Error
    0x80070643 Defender Troubleshooter - gives conflicting reports"
    <https://answers.microsoft.com/en-us/windows/forum/windows_10-security/kb4052623-version-4161765618052-error-0x80070643/a1e767bb-7225-4e11-998c-3a620c980f62>
    had another experience, but that might have been with an earlier version of
    the tool.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3684</guid>
    <title><![CDATA[Syncing Contacts with the Apple iCloud]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3684</link>
    <pubDate>Sun, 20 Jan 2019 21:42:00 +0100</pubDate>
    <description><![CDATA[Published by marco on 20. Jan 2019 21:42:00
------------------------------------------------------------------------

"too long; didn't read: Back up with Time Machine before syncing your contacts
via iCloud. If iCloud wipes out your contacts, you can restore the
~/Library/Application Support/AddressBook/ folder to get them back."

I regularly use two MacOS devices and one iOS device. Considering who else
already has my contacts, I figure it was time, for convenience's sake, to use
Apple's iCloud to sync my contacts across the three devices.

I obviously not writing this article to inform the world that everything went
smoothly.

  * My desktop has the definitive list of contacts.
  * My phone has a copy of these contacts, synced recently.
  * My laptop has only a handful of contacts with only phone numbers. [1]

So how should I proceed?

Well, obviously, turn on syncing contacts to iCloud from the desktop, to "prime"
the contacts with the definitive list. Then, turn on syncing from the laptop and
phone. I didn't expect any issues.

What did I get?

  * When I turned on syncing on the desktop, it didn't ask me anything. I didn't
    think anything of it.
  * When I turned on syncing on the laptop, it asked if I wanted to merge my
    contacts to the cloud. I assumed that this meant it was going to merge with
    the contacts that had already synced from the desktop. I didn't expect any
    problems since the laptop contacts were duplicates of the existing contacts
    (names and phone numbers were already in the other list). At most, I figured
    I'd have to resolve an easy merge-conflict or two.
  * The merge went seamlessly.
  * However, I didn't see any of the desktop contacts show up on the laptop,
    even after waiting what I felt was an appropriate period.
  * Instead, when I looked at the desktop, I was greeted with a very short list
    of contacts -- the list of contacts from the laptop, in fact.
  * iCloud: You keep using that word "merge"; I don't think it means what you
    think it means.
  * iCloud leaned back and folded its hands, a job well-done. I had only the
    smallest possible list of contacts and all of my contacts I'd curated over
    two decades were gone.

Well, I'm not an idiot, so they weren't really gone. But iCloud had made a bit
of work for me. If this happens to you, you can get your contacts back by doing
the following:

   1. Focus the Finder.
   2. Select the Go menu.
   3. Hold (-opt) to show the Library folder in the menu; select it to open a
      new Finder window.
   4. Browse to the ~/Library/Application Support/AddressBook/ folder
   5. Enter the Time Machine (I used the icon in the menu bar.
   6. Restore that folder to a previous version.
   7. You should see your prior contacts appear in the Contacts application.

Syncing worked properly for me after that.

It's still a mystery to me how this could have failed to work properly. Apple
has enough engineers and syncing a few address-book items isn't rocket science.

--------------------------------------------------------------------------------


[1] I'd done this on vacation, when I'd started using Messages more.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3377</guid>
    <title><![CDATA[SQL Server Express Windows Authentication error]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3377</link>
    <pubDate>Sun, 19 Feb 2017 21:49:10 +0100</pubDate>
    <description><![CDATA[Published by marco on 19. Feb 2017 21:49:10
------------------------------------------------------------------------

Since the beginning of the year, I've been plagued by an intermittent error
while connecting to SQL Server Express with default Windows authentication:

"Login failed. The login is from an untrusted domain and cannot be used with
Windows authentication. (Microsoft SQL Server, Error: 18452)"

The first time I encountered it, I was only able to fix it by logging out of
Windows and logging back on. The second time, it went away the next morning
after I'd logged back in after hibernation. I recently ran into the problem
again and wanted to get to the bottom of it. Restarting SQL Server Express had
no effect.

After some dead-end search results, I found an answer at the following page:
"SQL Server 2008 Windows Auth Login Error: The login is from an untrusted
domain"
<http://stackoverflow.com/questions/546746/sql-server-2008-windows-auth-login-error-the-login-is-from-an-untrusted-domain#6553362>:

"Make sure you aren't connected to a VPN on another domain\user"

That was the answer for me: I was indeed connected to a customer VPN using
SonicWall. Instead of just authenticating to the database with the user that I'd
used to log in to Windows (my primary login), Windows was using the login that
I'd used to connect to the VPN. It's unfortunate that Windows cannot do the
right thing in this case, but the solution is to log out of the VPN, after which
SQL Server Express once again works as expected with Windows authentication.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3353</guid>
    <title><![CDATA[Set Up Spell-checking Languages in MacOS]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3353</link>
    <pubDate>Sun, 08 Jan 2017 23:02:33 +0100</pubDate>
    <description><![CDATA[Published by marco on 8. Jan 2017 23:02:33
Updated by marco on 8. Jan 2017 23:04:37
------------------------------------------------------------------------

For the impatient (tl;dr):

   1. Open System Preferences
   2. Select the Keyboard panel
   3. Activate the Text page
   4. Show the drop-down under Spelling:
   5. Select the last item in the list, named Set Up...
   6. Check/uncheck to select and drag & drop to sort your preferred languages

[Details and Screenshots]

I recently set up a new Mac to work on develop iOS apps at "Encodo"
<http://encodo.com>. I relatively quickly noticed that the machine was set up
for British English (en-GB) rather than my customary US English (en-US). There
aren't many differences, and I could have lived with the display language in
en-GB, but the spellchecker was driving me nuts.

[image]First, I fired up the Language and Region preferences panel in the System
Preferences. I removed British English and installed US English instead. Some
applications updated immediately and the others updated after I'd logged out
once and logged back in.

[image]But the spell-checker was unaffected. I do a lot of writing in the Opera
browser, which also has standard language settings. As far as I know, those sent
to web servers as part of requests to indicate which languages are "acceptable".
I noticed that here, too, British English had been installed (presumably matched
to the prior system language). I switch to US English but was disappointed to
see that these language settings didn't control the spell-checker in the
browser.

[image]So where was Opera getting its spell-checking dictionary? From the OS?
But I'd already told the OS to use US English, hadn't I? Or had I? Just because
the OS is using US English to display text doesn't mean it's using it to proof
text. Fine. I gave up temporarily, resigned to ignoring red. wavy lines for
missing "u"s in "color" and "favorite" and for improper "z"s where "s"s were
expected in "synchronize" and "personalize".

[image]Just today, though, I finally searched for "MacOS change spell-checking
language" -- rather than searching for "Opera change spell-checking language" --
and hit paydirt. The settings for which spellcheckers to use in MacOS are found
not in Language and Region but in Keyboard => Text. Naturally. From there, you
can enable/disable and change the order of the available spell-checking
languages not by clicking a button labeled Set Up... but by selecting the last
item in the drop-down under Spelling.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3286</guid>
    <title><![CDATA[Avoiding Planned Obsolescence with a MacBook Pro]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3286</link>
    <pubDate>Mon, 11 Jul 2016 23:27:18 +0200</pubDate>
    <description><![CDATA[Published by marco on 11. Jul 2016 23:27:18
Updated by marco on 11. Jul 2016 23:31:12
------------------------------------------------------------------------

"Some friends of mine have an older MacBook Pro, from mid-2010. I recently
helped them upgrade from OS X 10.6 to 10.11 (El Capitan). The following article
grew out of instructions I sent them for taking the next step: upgrading some
hardware to increase the longevity of their laptop even further. I added a lot
more detail after I'd upgraded my own end-2009 iMac with a new SSD."

By jumping five OS versions, you've got lots of new toys -- better mail and
calendar integration, a new Photos application, Messages, FaceTime, etc. The
machine is pretty quick for most things, but you’ll bog down running a lot of
things at once or running larger apps with lots of data like Photos. That’s
because the new OS is a bit more efficient than the old one, but the amount of
data you’re slinging is big for 4GB of RAM (e.g. thousands of thumbnails for
Photos, Chrome with several tabs, etc.).

There are two things you can do to address this:

  * Increase RAM from 4GB to 8GB/16GB to be able to run more apps at once
  * Upgrade storage from HD to SSD to improve average drive speed by about 3-4x

tl;dr: With $230 and knowing how to use a screwdriver, you can speed things up
considerably and postpone an upgrade for years.

You can stick with what you have, but you’ll have to baby the machine more to
avoid slowdowns (e.g. quit Chrome before you start Photos).

If you're interested, read on.

[Recommendation]

See the "Shopping List" <#shoppinglist> below for a full list of possibilities
and links if you want to shop around.

I recommend:

  * "8GB RAM upgrade"
    <https://eshop.macsales.com/item/Other%20World%20Computing/8566DDR3S8GP/>
    ($52)
  * "480GB SSD Upgrade Kit"
    <https://eshop.macsales.com/item/Other%20World%20Computing/YSSDMP480/>
    ($182)

Why those?

Kath and I have found 8GB of RAM to be the sweet spot for home users. Only
developers/gamers need 16GB. No sense spending money on more unless you just
want MOAR.

It took you 6 years to get up to 210GB of space on your drive. While 240GB is
enough, you might as well get some room to grow while you upgrade the speed. 1TB
is more than you need unless you get into video-editing, which tends to eat a
lot of space. If you start to store large movies, get a regular external drive
(HDD) for that. No SSD needed.

[Step-by-Step Guide]

[Preparation]

   1. Make sure you can boot the Mac once you've removed the old hard drive (see
      "Choosing a Boot Disk" <#choosebootdisk>)
   2. Back up with Time Machine
   3. Disconnect the Time Machine drive
   4. Shut down

[Install RAM]

See "Hardware Installation" <#hardwareinstallation> for a video.

   1. Remove bottom of laptop (see videos below; use the screwdrivers provided
      with the SSD kit)
   2. Install the RAM
   3. Replace bottom; secure with one or two screws
   4. Boot up; verify it has 8GB (click “About This Mac” in the top-left
      Apple menu)
   5. Shut down

[Install SSD]

See "Hardware Installation" <#hardwareinstallation> for a video.

   1. Remove bottom of laptop
   2. Install the SSD
   3. Replace bottom; secure with one or two screws

[Transfer data]

The following detailed steps are what I did to restore my OS to the new SSD. [1]

   1. Connect the Time Machine drive
   2. Boot up while holding down (-opt)
   3. [image][image]You will see the Startup Manager (first image, right) with
      your Time Machine or USB stick drive shown. If you instead see only a gray
      screen for 30 seconds, then a folder with a question mark (second image,
      right), reboot and try again.
   4. Select the boot drive and press Enter to boot from that drive
   5. [image]You should see the OS X Recovery Console (third image, right)
   6. The first step is to set up the new SSD so that the installer recognizes
      it as a valid drive (it's currently completely empty). Start the Disk
      Utility (last option in the list).
   7. [image]Select the SSD on the left, then press the Erase button in the
      toolbar.
   8. In the dialog, make sure the settings are as shown, with the Format set to
      "OS X Extended (Journaled)" and Scheme set to "GUID Partition Map" (the
      defaults). Choose whatever name for the drive that you like.
   9. Press Erase to format the SSD. This should only take a few seconds.
   10. When finished, quit the Disk Utility (press (-cmd) + Q)
   11. You should be back at the Recovery Console with the list of "Mac OS X
       Utilites" (third image, right).
   12. Click the first option, "Restore from a Time Machine backup"
   13. First, "Select a Backup Source". Give it a few seconds to find your Time
       Machine Backup drive. Don't panic if the list shows no items at first.
   14. Select your Time Machine drive and continue
   15. Wait while your backup is restored to the new drive. [2]
   16. Reboot and start up normally
   17. Verify everything is OK (startup should already be much faster)

[Close it up]

   1. Shut down
   2. Replace remaining screws
   3. Start up again
   4. Enjoy the speed

[Post-Restore Steps]

After you've restored your Time Machine backup to the new drive, you'll have to
let OS X do a little bookkeeping. Specifically,

  * Mail will want to restore your mail database. This is an expected result of
    having restored from the backup. Let it churn its way through your mails and
    you'll be ready to go in a few minutes.
  * Photos will also want to "repair" your Photo Library. You'll have to let it
    do its thing as well -- mine took about twenty minutes to finish.

After that, you should be all set and have a much faster machine. [3]

[Shopping list]

RAM upgrade options:

  * "8GB RAM"
    <https://eshop.macsales.com/item/Other%20World%20Computing/8566DDR3S8GP/>
    ($52)
  * "16GB RAM"
    <https://eshop.macsales.com/item/Other%20World%20Computing/8566DDR3S16P/>
    ($95)
  * "All RAM options for MacBook Pro 13" mid-2010"
    <https://eshop.macsales.com/MyOWC/Upgrades.cfm?sort=pop&model=387&type=Memory>

SSD upgrade options:

  * "240GB SSD Upgrade Kit"
    <https://eshop.macsales.com/item/Other%20World%20Computing/YSSDMP240/>
    ($113)
  * "480GB SSD Upgrade Kit"
    <https://eshop.macsales.com/item/Other%20World%20Computing/YSSDMP480/>
    ($182)
  * "All SSD options for MacBook Pro 13" mid-2010"
    <https://eshop.macsales.com/MyOWC/Upgrades.cfm?sort=pop&model=387&type=InternalDrives>

[Hardware Installation]

So, once you get your goodies, you’ll have to play computer surgeon and
install them. Luckily for you, that looks really, really easy.

[How to install the RAM]

You really just need to know how to use a screwdriver. Watch the video below to
find out how to do it.

"How to upgrade memory in a 13" mid-2010 MacBook Pro"
<https://eshop.macsales.com/installvideos/macbookpro_13_unibody_mid10_mem/>

[How to install the SSD]

Again, just a screwdriver. Video explains everything. The first couple of
minutes are the same as for the RAM.

"How to replace the hard drive in a 13" mid-2010 MacBook Pro"
<https://eshop.macsales.com/installvideos/macbookpro_13_unibody_mid10_hd/>

Both installations require you to remove the bottom of the laptop, but I would
recommend doing the RAM first, verifying that it works with the old drive, then
doing the SSD. You don’t have to put in all the screws again in between.

[Choosing a Boot Disk]

[image]Once you've replaced your hard drive with the operating system on it with
an empty SSD, how will your computer start? Answer: it can't. If you just boot
your machine at this point, there's a decent chance that you will see a folder
with a question mark in it.

So your first step is to make sure you have a boot disk.

Your Time Machine backup drive is bootable if it's been initialized in a certain
way. [4] If it's not set up correctly, you can't use it as a boot drive. You can
use the Disk Utility to check whether your drive will work as a boot drive.

[image][image]

  * Start the Disk Utility.
  * Select your Time Machine drive from the list on the left.
  * If the "Partition Map" is "Master Boot Record" (first image, right) then
    you'll need to "create a boot disk"
    <https://www.earthli.com/news/createbootdisk>. [5] If it's "GUID Partition
    Map" (second image, right), then you're in luck and can almost certainly
    boot directly from that drive.

[Verify Booting]

[image]Once you have a drive that you think you can boot from -- either your
Time Machine drive has the right partition map or you've created a bootable USB
stick -- you can quickly test whether it can actually boot your machine by
restarting your Mac and holding down the (-opt) key while booting. Your machine
will show a row of icons on startup (the Startup Manager, right), one for each
bootable drive. You should see your Time Machine drive or the USB bootable
drive. If you do, you're ready to replace the hard drive.

[Creating a Boot Disk]

The article "Create a bootable installer for OS X"
<https://support.apple.com/en-us/HT201372> will help you make a boot disk. If
you have a really new machine, you might also be able to benefit from a network
boot over your wireless connection, but I wasn't able to test that.

If you need to make a boot disk for the latest OS X (as of this writing) El
Capitan, you'll need to do the following:

   1. Get an 8GB (or larger) USB stick that you can overwrite completely. [6]
   2. Note the name of the USB stick (e.g. "Data")
   3. Open the App Store.
   4. Search for El Capitan.
   5. [image]You should see the link to the OS. Since you already have it
      installed, the button underneath says Download. (see first image, right.)
   6. [image]Press the Download button. The installer is about 6.5GB, so it will
      take some time to download. The only indication you have that something is
      happening is that the word "Download" changed to "Downloading". (See
      second image, right.) Open the Launcher application to see a progress bar.
   7. Once it's downloaded, you should see Install OS X El Capitan in your
      Applications folder. Do not open it. Also, unhook your Time Machine backup
      temporarily to avoid backing 6GB of data that you will only need
      temporarily.
   8. Close the installer when it automatically starts (press (-cmd) + Q)
   9. Open the Terminal application. [7]
   10. From the command line, execute sudo /Applications/Install\ OS\ X\ El\
       Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Data
       --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app. Replace
       the highlighted word "Data" with the name of your USB stick.
   11. You should now see a message indicating that the USB drive is being
       formatted and the installer is being copied over.
   12. When it's finished, you have a copy of OS X from which you can boot the
       computer and install OS X or, more importantly, run the Recovery Console
       and restore from a Time Machine backup.

--------------------------------------------------------------------------------


[1] I referred to "How to Migrate OS X and Your Data to a New Drive"
    <https://eshop.macsales.com/articles/how-to-transfer-your-data-from-your-old-drive-to-a-new-drive>
    and "OS X: About OS X Recovery" <https://support.apple.com/en-us/HT201314>


[1] My Time Machine Backup drive is only USB2, so the transfer rate was quite
    slow. It took almost five hours to restore about 250GB. If your external
    drive is USB3 and/or if you have less data, it should restore much more
    quickly.


[1] After my upgrade, starting Photos went from a minute to about 5 seconds.
    Booting the machine and restoring all open applications takes about 20--30
    seconds instead of several minutes.


[1] Specifically, this means that your drive need to have a GUID partition
    table, not an MBR partition table. Mine, for example, had the MBR table
    because I have two partitions: an HFS+ drive for Time Machine backups and an
    NTFS partition that I can also read from Windows machines.


[1] You can also reformat your Time Machine drive using the Disk Utility and set
    it up so it has the expected partitioning scheme (see "steps 6--10"
    <#formatdisk> in "Transfer Data") , but I wouldn't recommend throwing away
    all of your backups.


[1] Make it USB3 if you can because copying to it will be much faster.


[1] You're going to execute a command-line command to build the boot drive. Deep
    breath. Don't be afraid.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3285</guid>
    <title><![CDATA[Showing Pictures on a Map in OS X Photos (2016)]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3285</link>
    <pubDate>Thu, 30 Jun 2016 12:49:09 +0200</pubDate>
    <description><![CDATA[Published by marco on 30. Jun 2016 12:49:09
------------------------------------------------------------------------

This feature is quite nice, but less intuitive than I'd expected. When I
upgraded a friend's computer, I was unable to figure out how to get to the map
that I knew I'd seen before. With a bit more time and a web search, I was able
to figure out how this thing works again.

[Usability]

In iPhoto, there was a "Locations" view to which you could switch to show the
world map with pins in it. While convenient, Apple never figured out how to make
this feature scale to tens of thousands of pictures so it could be quite slow.

In Photos, instead of this top-down view, you can now see any group of photos on
a map by clicking the details above that group. Once you know how to find it,
this is quite convenient. Also, the map contains only information about the set
of photos that you were already looking at, instead of all of the photos in your
entire collection. This change leads to significant performance gains when
working with the map.

[Viewing Pictures in the Browser]

By default, you're looking at photos in "Moments View" (shown below). Moments
have the fewest number of pictures in them, but you can see those on the map by
clicking the location next to the title.

[image]

It's more interesting to see larger sets of pictures, so click the back arrow to
zoom out to "Collections View".

[image]

In this example, the sets of pictures correspond roughly to single days. As with
the "Moments View", you can show the pictures in a set on a map by clicking the
location next to the title. Click the back arrow to zoom out to "Years View".

[image]

[Viewing Pictures on the Map]

Now we've got a lot of pictures to show, so we'll click the location next to the
title to show all of the pictures for a given year on a map. You can click on
any pile to show that set of photos in the regular view to edit, browse, etc.

[image]

In this example, double-clicking on Europe zooms in once and one of the piles in
Europe splits into two piles automatically, to better show the relative
locations of pictures.

[image]

Double-clicking on Europe again zooms in again and resolves to five piles of
pictures. Keep zooming in to break up larger piles of pictures. Click any pile
to show those pictures as moments and/or collections.

[image]

Once you know where to click, it's quite easy to use the map in OS X Photos. If
you don't know where to click, it's unlikely you'll ever discover the feature at
all.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3278</guid>
    <title><![CDATA[Windows 10 Windows Update Malfunction]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3278</link>
    <pubDate>Sun, 12 Jun 2016 22:19:44 +0200</pubDate>
    <description><![CDATA[Published by marco on 12. Jun 2016 22:19:44
------------------------------------------------------------------------

"
tl;dr: If Windows 10 fails to install updates several times, you may have a
corrupted update database. Follow the "steps listed here"
<http://answers.microsoft.com/en-us/windows/forum/windows_10-update/windows-10-error-0x80200056/b22e9fdd-9e5f-4850-af87-8351ae019d38>
 to fix things. It will take quite a while, but it works out in the end.
"

Several months ago, I upgraded to Windows 10 on my laptop. Things went OK [1]
and I was basically able to continue working uninterrupted.

[Windows Insomnia]

A couple of weeks ago, I noticed that my laptop was almost always "awake" in the
morning and seemed to be quite busy doing stuff when I wasn't using it.

At Encodo, we have some group policies that determine when updates are to be
applied and will wake up the machine to do so. I figured it was probably
something like that and paid it no further mind. When the insomnia persisted, I
checked the Windows Update settings again and saw a whole list of updates to
install.

I told Windows to restart, install the updates and be done with it, once and for
all. I went off to do something else and found my machine once again busy doing
something, hours later. Suspicious, I found more pending updates, looking
suspiciously like the ones I'd just installed.

[Corrupted Update Database]

I restarted again, this time watching as Windows very quickly restarted --
without installing anything at all. My Windows very definitely had a problem. It
thought it had updates to install -- a lot of big ones, actually -- but couldn't
actually install them. (Probably because they were already installed.)

The big missing package was "Upgrade to Windows 10 Enterprise, version 1511,
10586.", as well as a lot of Micorosft Office-related packages. Searching for
help, I ended up on this page, "Windows 10 Error 0x80200056"
<http://answers.microsoft.com/en-us/windows/forum/windows_10-update/windows-10-error-0x80200056/b22e9fdd-9e5f-4850-af87-8351ae019d38>,
where I found an answer from August 7, 2015. 

I was hoping for something a little more recent, but apparently this problem has
been plaguing users for almost a year. The answer pointed to corrupted Windows
Update Components and describes how to shut off the related services, rename the
corrupt databases and re-enable services.

[A Giant Update]

After following the instructions and after a restart, Windows Update will start
to download and apply a ton of updates -- it seems now to be unaware of what had
already been installed. Corrupted is corrupted, so you have to go through with
it; a Windows that restarts every 1.5 hours trying in vain to install updates is
not going to cut it.

Be warned, though, if the corrupted package that you have is the same as the one
I listed above (1511, 10586), then you're in for quite an upgrade process.
Windows 10 will -- for all intents and purposes -- re-install itself. The
updates took about an hour to apply before I was back at a desktop. I once again
have a Windows.Old folder and I almost lost my local user settings.

Read on if you, too, suffer from a lost profile after this process.

[Missing Local Settings]

[image]When I first logged in, everything was back to defaults. I was
disappointed, but figured that the gigantic upgrade had simply reset everything.
In fact, my profile was still around and Windows was trying to tell me about it,
although a bit too subtly -- and with a message that didn't render properly in
the 150%-resolution mode to which it had defaulted.

The message is cut off -- and clicking the Action Center shows me other
messages, but not this relatively important one. At any rate, I was able to
figure out that it was telling me to open the Event Viewer. There, I saw several
errors.

[image]

The first message was pretty scary

<error>
Windows was unable to load the registry. This problem is often caused by
insufficient memory or insufficient security rights. 

DETAIL - The process cannot access the file because it is being used by another
process. for C:\Users\marco\ntuser.dat
</error>

The Windows registry is pretty important, but what the message actually meant
was that the user registry couldn't be loaded. That became clearer in the next
message:

<error>
Windows cannot load the locally stored profile. Possible causes of this error
include insufficient security rights or a corrupt local profile. 

DETAIL - The process cannot access the file because it is being used by another
process.
</error>

It was unclear which process was using the file that Windows wanted to open.
What else could have been running at that time? This also explained the rather
mysterious directive above that "to fix this, sign out and try signing in
later." This is Windows's way of acknowledging that it was probably standing on
its own tail and had locked itself out. "Later" is a touch vague, though.

The next message was more reassuring but it was unclear what was supposed to
happen. I'd logged out and logged back in, as directed, and still had the same
problem.

<error>
Windows has backed up this user profile. Windows will automatically try to use
the backup profile the next time this user logs on.
</error>

Here's the final error message, repeating what I'd already seen in the desktop
notification. Still, I had hope that Windows would eventually right itself.

<error>
Windows cannot find the local profile and is logging you on with a temporary
profile. Changes you make to this profile will be lost when you log off.
</error>

Instead of just logging out, I went back to the good, old tactic of just
restarting Windows -- "have you tried turning it off and on again?" -- and was
greeted with my old profile! First, I had to endure the Windows 10 greetings and
requests for patience. This led to a nervous few seconds that I would have a
clean profile again. In the end, though, everything was back to normal -- albeit
after a long, unproductive day.

[Cleanup]

I'm not done yet. As it appears, there are still more updates to apply, I've
lost a few settings and will also have to run the "Disk Cleanup" again to remove
the old Windows and a lot of temporary files. But I'm hopeful that my Windows
Update problems are over, at least for now. [2]

--------------------------------------------------------------------------------


[1] Several weeks after the upgrade, an update came down the pike that screwed
    up my wireless network driver so it more than occasionally dropped off the
    network. I could always reconnect by toggling wireless on and off several
    times until my network showed up again, but you can see how that would get
    quite tiresome.


[1] And hey, optimist that I am, maybe even my wireless-network problems will
    gone as well.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3216</guid>
    <title><![CDATA[Git: Managing local commits and branches]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3216</link>
    <pubDate>Fri, 12 Feb 2016 20:19:16 +0100</pubDate>
    <description><![CDATA[Published by marco on 12. Feb 2016 20:19:16
------------------------------------------------------------------------

At Encodo, we've got a relatively long history with Git. We've been using it
exclusively for our internal source control since 2010. [1]

[Git Workflows]

[Git]When we started with Git at Encodo, we were quite cautious. We didn't
change what had already worked for us with "Perforce" <http://perforce.com>. [2]
That is: all developers checked in to a central repository on a mainline or
release branch. We usually worked with the mainline and never used personal or
feature branches.

Realizing the limitation of this system, we next adopted an early incarnation
GitFlow, complete with command-line support for it. A little while later, we
switched to our own streamlined version of GitFlow without a dev branch, which
we published in an earlier version of the "Encodo Git Handbook"
<https://www.earthli.com/news/view_article.php?id=421>. [3]

We're just now testing the waters of Pull Requests instead of direct commits to
master and feature branches. Before we can make this move, though, we need to
raise the comfort level that all of our developers have toward creating branches
and manipulating commits. We need to take the magic and fear out of Git -- but
that's a pushed commit! [4] -- and learn how to view Git more as a toolbox that
we can make for us rather than a mysterious process to whose whims we must
comply. [5]

[General Rules]

Before we get started, let's lay down some ground rules for working with Git and
source control, in general.

  * Use branches
  * Don't use too many branches at once
  * Make small pull requests
  * Use no more than a few unpushed commits
  * Get regular reviews

As you can see, the rules describe a process of incremental changes. If you
stick to them, you'll have much less need for the techniques described below. In
case of emergency, though, let's demystify some of what Git does.

If you haven't done so already, you should really take a look at some
documentation of how Git actually works. There are two sources I can recommend:

  * The all-around excellent and extremely detailed "Official Git Documentation"
    <http://git-scm.com/documentation>. It's well-written and well-supplied with
    diagrams, but quite detailed.
  * The "Encodo Git Handbook"
    <https://www.earthli.com/news/view_article.php?id=421> summarizes the
    details of Git we think are important, as well as setting forth best
    practices and a development process.

[Examples]

All examples and screenshots are illustrated with the "SmartGit"
<http://www.syntevo.com/smartgit/> log UI.

<info>
Before you do any of the manipulation shown below, always make sure your working
tree has been cleared. That means there are no pending changes in it. Use the
stash command to put pending changes to the side.
</info>

[Moving branches]

In SmartGit, you can grab any local branch marker and drag it to a new location.
SmartGit will ask what you want to do with the dropped branch marker, but you'll
almost always just want to set it to the commit on which you dropped it.

This is a good way of easily fixing the following situation:

   1. You make a bunch of commits on the master branch
   2. You get someone to review these local commits
   3. They approve the commits, but suggest that you make a pull request instead
      of pushing to master. A good reason for this might be that both the
      developer and the face-to-face reviewer think another reviewer should
      provide a final stamp of approval (i.e. the other reviewer is the expert
      in an affected area)

In this case, the developer has already moved their local master branch to a
newer commit. What to do?

[Create a pull-request branch]

Create and check out a pull-request branch (e.g. mvb/serviceImprovements).

[image]

[image]

[Set master to the origin/master]

Move the local master branch back to origin/master. You can do this in two ways:

  * Check out the master branch and then reset to the origin/master branch or...
  * Just drag the local master branch to the origin/master commit.

[image]

[Final: branches are where they belong]

In the end, you've got a local repository that looks as if you'd made the
commits on the pull-request branch in the first place. The master branch no
longer has any commits to push.

[image]

[Moving & joining commits]

SmartGit supports drag&drop move for local commits. Just grab a commit and drop
it to where you'd like to have it in the list. This will often work without
error. In some cases, like when you have a lot of commits addressing the same
areas in the same files, SmartGit will detect a merge conflict and will be
unable to move the commit automatically. In these cases, I recommend that you
either:

  * Give up. It's probably not that important that the commits are perfect.
  * Use the techniques outlined in the long example below instead.

You can also "join" -- also called "squash" in Git parlance -- any adjoining
commits into a single commit. A common pattern you'll see is for a developer to
make changes in response to a reviewer's comments and save them in a new commit.
The developer can then move that commit down next to the original commit from
which the changes stemmed and join the commits to "repair" the original commit
after review. You can at the same time edit the commit message to include the
reviewer's name. Nice, right?

Here's a quick example:

[Initial: three commits]

We have three commits, but the most recent one should be squashed with the first
one.

[image]

[Move a commit]

Select the most recent commit and drag it to just above the commit with which
you want to join it. This operation might fail. [6]

[image]

[Squash selected commits]

Select the two commits (it can be more) and squash/join them. This operation
will not fail.

[image]

[Final: two commits]

When you're done, you should see two commits: the original one has now been
"repaired" with the additional changes you made during the review. The second
one is untouched and remains the top commit.

[image]

[Diffing commits]

You can squash/join commits when you merge or you can squash/join commits when
you cherry-pick. If you've got a bunch of commits that you want to combine,
cherry-pick those commits but don't commit them.

You can also this technique to see what has changed between two branches. There
are a lot of ways to do this, and a lot of guides will show you how to execute
commands on the command line to do this.

In particular, Git allows you to easily display the list of commits between two
other commits as well as showing the combined differences in all of those
commits in a patch format. The patch format isn't very easy to use for diffing
from a GUI client, though. Most of our users know how to use the command line,
but use SmartGit almost exclusively nonetheless -- because it's faster and more
intuitive.

So, imagine you've made several commits to a feature or release branch and want
to see what would be merged to the master branch. It would be nice to see the
changes in the workspace as a potential commit on master so you can visually
compare the changes as you would a new commit.

Here's a short, visual guide on how to do that.

[Select commits to cherry-pick]

Check out the target branch (master in this example) and then select the commits
you want to diff against it.

[image]

[Do not commit]

When you cherry-pick, leave the changes to accumulate in the working tree. If
you commit them, you won't be able to diff en bloc as you'd like.

[image]

[Final: working tree]

The working tree now contains the differences in the cherry-picked commits.

[image]

Now you can diff files to your heart's content to verify the changes.

[Working-tree files]

Once you have changes in the working tree that are already a part of other
commits, you might be tempted to think you have to revert the changes because
they're already committed, right?

You of course don't have to do that. You can let the original commits die on the
vine and make new ones, as you see fit.

Suppose after looking at the differences between our working branch and the
master branch, you decide you want to integrate them. You can do this in several
ways. 

   1. You could clear the working tree [7], then merge the other branch to
      master to integrate those changes in the original commits.
   2. Or you could create one or more new commits out of the files in the
      workspace and commit those to master. You would do this if the original
      commits had errors or incomplete comments or had the wrong files in them.
   3. Or you could clear the working tree and re-apply the original commits by
      cherry-picking and committing them. Now you have copies of those commits
      and you can edit the messages to your heart's content.

Even if you don't merge the original commits as in option (1) above, and you
create new commits with options (2) and (3), you can still merge the branch so
that Git is aware that all work from that branch has been included in master.
You don't have to worry about applying the same work twice. Git will normally
detect that the changes to be applied are exactly the same and will merge
automatically. If not, you can safely just resolve any merge conflicts by
selecting the master side. [8]

[An example of reorganizing commits]

<info>Abandon hope, all ye who enter here. If you follow the rules outlined
above, you will never get into the situation described in this section. That
said...when you do screw something up locally, this section might give you some
idea of how to get out of it. Before you do anything else, though, you should
consider how you will avoid repeating the mistake that got you here. You can
only do things like this with local commits or commits on private
branches.</info>

The situation in this example is as follows:

  * The user has made some local commits and reviewed them, but did not push
    them.
  * Other commits were made, including several merge commits from other pull
    requests.
  * The new commits still have to be reviewed, but the reviewer can no longer
    sign the commits because they are rendered immutable by the merge commits
    that were applied afterward.
  * It's difficult to review these commits face-to-face and absolutely
    unconscionable to create a pull request out of the current local state of
    the master branch.
  * The local commits are too confusing for a reviewer to follow.

[The original mess]

So, let's get started. The situation to clean up is shown in the log-view below.

[image]

[Pin the local commits]

Branches in Git are cheap. Local ones even more so. Create a local branch to pin
the local commits you're interested in into the view. The log view will
automatically hide commits that aren't referenced by either a branch or a tag.
[9]

[image]

[Choose your commits]

Step one: find the commits that you want to save/re-order/merge.

[image]

The diagram below shows the situation without arrows. There are 17 commits we
want, interspersed with 3 merge commits that we don't want. [10]

[image]

[Reset local master]

Check out the master branch and reset it back to the origin.

[image]

[Cherry-pick commits]

Cherry-pick and commit the local commits that you want to apply to master. This
will make copies of the commits on pin.

[image]

[Master branch with 17 commits]

When you're done, everything should look nice and neat, with 17 local commits on
the master branch. You're now ready to get a review for the handful of commits
that haven't had them yet. [11]

[image]

[Delete the temporary branch]

You now have copies of the commits on your master branch, so you no longer care
about the pin branch or any of the commits it was holding in the view. Delete
it.

[image]

[That pesky merge]

Without the pin, the old mess is no longer displayed in the log view. Now I'm
just missing the merge from the pull request/release branch. I just realized,
though: if I merge on top of the other commits, I can no longer edit those
commits in any way. When I review those commits and the reviewer wants me to fix
something, my hands will be just as tied as they were in the original sitution.

[image]

[Inserting a commit]

If the tools above worked once, they'll work again. You do not have to go back
to the beginning, you do not have to dig unreferenced commits out of the Git
reflog.

Instead, you can create the pin branch again, this time to pin your lovely,
clean commits in place while you reset the master branch (as before) and apply
the merge as the first commit.

[image]

[Rebase pin onto master]

Now we have a local master branch with a single merge commit that is not on the
origin. We also have a pin branch with 17 commits that are not on the origin. 

Though we could use cherry-pick to copy the individual commits from pin to
master, we'll instead rebase the commits. The rebase operation is more robust
and was made for these situations. [12]

[image]

[pin is ready]

We're almost done. The pin branch starts with the origin/master, includes a
merge commit from the pull request and then includes 17 commits on top of that.
These 17 commits can be edited, squashed and changed as required by the review.

[image]

[Fast-forward master]

Now you can switch to the master branch, merge the pin branch (you can
fast-forward merge) and then delete the pin branch. You're done!

[image]

[Conclusion]

I hope that helps take some of the magic out of Git and helps you learn to make
it work for you rather than vice versa. With just a few simple tools -- along 
with some confidence that you're not going to lose any work -- you can do pretty
much anything with local commits. [13] 

h/t to Dani and Fabi for providing helpful feedback.

--------------------------------------------------------------------------------


[1] Over five years counts as a long time in this business.


[1] I haven't looked at their product palette in a while. They look to have
    gotten considerably more enterprise-oriented. The product palette is now
    split up between the Helix platform, Helix versioning services, Helix
    Gitswarm and more.


[1] But which we've removed from the most recent version, 3.0.


[1] This is often delivered in a hushed tone with a note of fervent belief that
    having pushed a commit to the central repository makes it holy. Having
    pushed a commit to the central repository on master or a release branch is
    immutable, but everything else can be changed. This is the reason we're
    considering a move to pull requests: it would make sure that commits become
    immutable only when they are ready rather than as a side-effect of wanting
    to share code with another developer.


[1] In all cases, when you manipulate commits -- especially merge commits -- you
    should minimally verify that everything still builds and optimally make sure
    that tests run green.


[1] If the commits over which you're moving contain changes that conflict with
    the ones in the commit to be moved, Git will not be able to move that commit
    without help. In that case, you'll either have to (A) give up or (B) use the
    more advanced techniques shown in the final example in this blog.


[1] That is, in fact, what I did when preparing this article. Since I'm not
    afraid of Git, I manipulated my local workspace, safe in the knowledge that
    I could just revert any changes I made without losing work.


[1] How do we know this? Because we just elected to create our own commits for
    those changes. Any merge conflicts that arise are due to the commits you
    expressly didn't want conflicting with the ones that you do, which you've
    already committed to master.


[1] You can elect to show all commits, but that would then show a few too many
    unwanted commits lying around as you cherry-pick, merge and rebase to
    massage the commits to the way you'd like them. Using a temporary branch
    tells SmartGit which commits you're interested in showing in the view.


[1] Actually, we do want to merge all changes from the pull-request branch but
    we don't want to do it in the three awkward commits that we used as we were
    working. While it was important at the time that the pull-request be merged
    in order to test, we want to do it in one smooth merge-commit in the final
    version.
  
  If you look closely, you can even see two immediately subsequent merges where
  I merged the branch and committed it. I realized there was a compile error and
  undid the commit, added the fixes and re-committed. However, the re-commit was
  no longer a merge commit so Git "forgot" that the pull-request branch had been
  merged. So I had to merge it again in order to recapture that information.
  
  This is going to happen to everyone who works more than casually with Git, so
  isn't it nice to know that you can fix it? No-one has to know.


[1] You may be thinking: what if I want to push the commits that have been
    reviewed to master and create a pull request for the remaining commits? Then
    you should take a look in the section above, called Moving branches, where
    we do exactly that.


[1] Why? As you saw above, when you cherry-pick, you have to be careful to get
    the right commits and apply them in the right order. The situation we
    currently have is exactly what rebase was made for. The rebase command will
    get the correct commits and apply them in the correct order to the master
    branch. If there are merge conflicts, you can resolve them with the client
    and the rebase automatically picks up where you left off. If you elect to
    cherry-pick the commits instead and the 8th out of 17 commits fails to merge
    properly, it's up to you to pick up where you left off after solving the
    merge conflict. The rebase is the better choice in this instance.


[1] Here comes the caveat: within reason. If you're got merge commits that you
    have to keep because they cost a lot of blood, sweat and tears to create and
    validate, then don't cavalierly throw them away. Be practical about the
    "prettiness" of your commits. If you really would like commit #9 to be
    between commits #4 and #5, but SmartGit keeps telling you that there is a
    conflict when trying to move that commit, then reconsider how important that
    move is. Generally, you should just forget about it because there's only so
    much time you should spend massaging commits. This article is about making
    Git work for you, but don't get obsessive about it.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3193</guid>
    <title><![CDATA[Limited drive-space chronicles #2: Why is Visual Studio installed on my machine?]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3193</link>
    <pubDate>Sun, 27 Dec 2015 17:19:53 +0100</pubDate>
    <description><![CDATA[Published by marco on 27. Dec 2015 17:19:53
Updated by marco on 27. Dec 2015 17:21:24
------------------------------------------------------------------------

If you're like us at Encodo, you moved to SSDs years ago...and never looked
back. However, SSDs are generally smaller because the price (still) ramps up
quickly as you increase size. We've almost standardized on 512GB, but some of us
still have 256GB drives.

Unfortunately, knowing that we all have giant hard drives started a trend among
manufacturers to just install everything, just in case you might need it. This
practice didn't really cause problems when we were still using by-then
terabyte-sized HDs. But now, we are, once again, more sensitive to unnecessary
installations.

If you're a Windows .NET developer, you'll feel the pinch more quickly as you've
got a relatively heavyweight Visual Studio installation (or three...) as well as
Windows 8.1 itself, which weighs in at about 60GB after all service packs have
been installed.

Once you throw some customer data and projects and test databases on your drive,
you might find that you need, once again, to free up some space on your drive.

I wrote a similar post last year and  "those tips & tricks"
<https://www.earthli.com/news/view_article.php?id= 3066> still apply as well.

[System Cleanup is back]

One additional tip I have is to use Win + S to search for "Free up disk space by
deleting unnecessary files" [1] and run that application in "clean up system
files" mode: the latest version will throw out as much Windows Update detritus
as it can, which can clean up gigabytes of space.

[image][image][image]

[Remove Old Visual Studios]

The other measure you can take is to remove programs that you don't use anymore:
for .NET developers that means you should finally toss out Visual Studio 2010 --
and possibly even 2013, if you've made the move to the new and improved 2015
already. [2] Removing these versions also has the added benefit that extensions
and add-ons will no longer try to install themselves into these older Visual
Studios anymore.

However, even if you do remove VS2010, for example, you might find that it just
magically reappears again. Now, I'm not surprised when I see older runtimes and
redistributables in my list of installed programs -- it makes sense to keep
these for applications that rely on them -- but when I see the entire VS2010 SP1
has magically reappeared, I'm confused.

[image]

Imagine my surprise when I installed SQL Server Management Studio 2016 -- the
November 2015 Preview -- and saw the following installation item:

[image]

However, if you do remove this item again, then SQL Server Management Studio
will no longer run (no surprise there, now that we know that it installed it).
However, if you're just doing cleanup and don't know about this dependency [3],
you might accidentally break tools. So be careful; if you're too aggressive,
you'll end up having to re-install some stuff. [4]

--------------------------------------------------------------------------------


[1] The reason I write that "it's back" is that for a couple of versions of
    Windows, Microsoft made it an optional download/feature instead of
    installing it by default.


[1] Be careful about removing Visual Studio 2013 if you have web projects that
    still rely on targets installed with VS2013 but not included in VS2015. I
    uninstalled 2013 on my laptop and noticed a warning about an MS target that
    the compiler could no longer find.


[1] The fact that Windows still can't tell you about dependencies is a story for
    another day. We should have had a package manager on Windows years ago. And,
    no, while Choco is a lovely addition, it's not quite the full-fledged
    package manager that aptitude is on Ubuntu.


[1] Speaking from experience. Could you tell?

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3143</guid>
    <title><![CDATA[How Encodo sets up new workstations]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3143</link>
    <pubDate>Fri, 05 Jun 2015 11:24:28 +0200</pubDate>
    <description><![CDATA[Published by marco on 5. Jun 2015 11:24:28
Updated by marco on 6. Jun 2015 16:42:47
------------------------------------------------------------------------

[Windows 8.1][Ubuntu][Clonezilla][Chocolatey][VirtualBox]At "Encodo"
<http://encodo.com>, we've recently set up a few new workstations with Windows
8.1 and wanted to share the process we use, in case it might come in handy for
others.

Windows can take a long time to install, as can Microsoft Office and, most
especially, Visual Studio with all of its service packs. If we installed
everything manually every time we needed a new machine, we'd lose a day each
time.

To solve this problem, we decided to define the Encodo Windows Base Image, which
includes all of the standard software that everyone should have installed. Using
this image saves a lot of time when you need to either install a new workstation
or you'd like to start with a fresh installation if your current one has gotten
a bit crufty.

Encodo doesn't have a lot of workstations, so we don't really need anything too
enterprise-y, but we do want something that works reliably and quickly.

After a lot of trial and error, we've come up with the following scheme.

  * Maintain a Windows 8.1 image in a VMDK file
  * Use VirtualBox to run the image
  * Use Chocolatey for (almost) all software installation
  * Use Ubuntu Live on a USB stick (from which to boot)
  * Use Clonezilla to copy the image to the target drive

[Installed Software]

The standard loadout for developers comprises the following applications.

These are updated by Windows Update.

  * Windows 8.1 Enterprise
  * Excel
  * Powerpoint
  * Word
  * Visio
  * German Office Proofing Tools
  * Visual Studio 2013

These applications must be updated manually.

  * ReSharper Ultimate
  * Timesnapper

The rest of the software is maintained with Chocolatey.

  * beyondcompare (file differ)
  * conemu (PowerShell enhancement)
  * fiddler4 (HTTP traffic analyzer)
  * firefox
  * flashplayerplugin
  * git (source control)
  * googlechrome
  * greenshot (screenshot tool)
  * jitsi (VOIP/SIP)
  * jre8 (Java)
  * keepass (Password manager)
  * nodejs
  * pidgin (XMPP chat)
  * poshgit (Powershell/Git integration)
  * putty (SSH)
  * smartgit (GIT GUI)
  * stylecop (VS/R# extension)
  * sublimetext3 (text editor)
  * sumatrapdf (PDF viewer)
  * truecrypt (Drive encryption)
  * vlc (video/audio player/converter)
  * winscp (SSH file-copy tool)
  * wireshark (TCP traffic analyzer)

[Maintaining the Image]

This part has gotten quite simple.

   1. Load the VM with the Windows 8.1 image
   2. Apply Windows Updates
   3. Update ReSharper, if necessary
   4. Run choco upgrade all to update all Chocolatey packages
   5. Shut down the VM cleanly

[Writing the image to a new SSD]

The instructions we maintain internally are more detailed, but the general gist
is to do the following,

   1. Install the SSD in the target machine
   2. Plug in the Ubuntu Live USB stick
   3. Plug in the USB drive that has the Windows image and Clonezilla on it
   4. Boot to the Ubuntu desktop
   5. Make sure you have network access
   6. Install VirtualBox in Ubuntu from the App Center
   7. Create a VMDK file for the target SSD
   8. Start VirtualBox and create a new VM with the Windows image and SSD VMDK
      as drives and Clonezilla configured as a CD
   9. Start the VM and boot to Clonezilla
   10. Follow instructions, choose options and then wait 40 minutes to clone
       data
   11. Power off Clonezilla
   12. Shut down Ubuntu Live
   13. Unplug the USB drive and stick
   14. Boot your newly minted Windows 8.1 from the SSD
   15. Install Lenovo System Update (if necessary) and update drivers (if
       necessary)
   16. Add the machine to the Windows domain
   17. Remote-install Windows/Office licenses and activate Windows
   18. Remote-install Avira antivirus
   19. Grant administrator rights to the owner of the laptop
   20. Use sysprep /generalize to reset Windows to an OOB (Out-of-box)
       experience for the new owner

[Conclusion]

We're pretty happy with this approach and the loadout but welcome any feedback
or suggestions to improve them. We've set up two notebooks in the last three
weeks, but that's definitely a high-water mark for us. We expect to use this
process one more time this year (in August, when a new hire arrives), but it's
nice to know that we now have a predictable process.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=3066</guid>
    <title><![CDATA[Who&rsquo;s using up my entire SSD?]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=3066</link>
    <pubDate>Sun, 23 Nov 2014 09:10:14 +0100</pubDate>
    <description><![CDATA[Published by marco on 23. Nov 2014 09:10:14
------------------------------------------------------------------------

[Hard drives => SSDs]

[image]In the old days, we cleaned up our hard drives because we didn't have
enough space for all of our stuff. Our operating systems, applications and
caches took up a reasonable portion of that hard drive.

Then we had gigantic hard drives with more than enough space for everything.
Operating systems, applications and caches grew. Parsimonious software was no
longer in vogue because it was a waste of time and money.

SSDs replaced hard drives, improving speeds drastically and ushering in a new
era in performance. This did not come without cost, though. SSDs were much more
expensive to make, so the affordable ones were necessarily much smaller than our
existing hard drives. Our operating systems, applications and caches have not
made the adjustment, though, at least not on Windows.

We are left with drives 70-80% smaller than the ones we had a couple of years
ago -- 256MB vs. 1TB. Developers, in particular, tend to have software that uses
space indiscriminately.

[Drive space: critical]

I recently noticed that my system drive had filled up to almost 80% and took a
little time to do something about it. I downloaded "TreeSize Free"
<http://www.jam-software.com/freeware/> from Jam Software to get an idea of
which folders took up the most space. I also referred to "Guide to Freeing up
Disk Space under Windows 8.1" by Scott Hanselman
<http://www.hanselman.com/blog/GuideToFreeingUpDiskSpaceUnderWindows81.aspx>:
there are a lot of great tips in there.

Without further ado, here are the locations that struck me as being "space hogs"
-- locations that were large but didn't seem to offer much utility or seemed to
be logs, caches or backups.

C:\Windows\Installer

   [image]This folder is almost 22GB on my machine. It seems to contain MS
   installers, updates, service packs and hot-fixes. There are a few tips online
   -- some from Microsoft -- on how to clean up this folder. Even after running
   a couple of them, I didn't notice a significant difference in size. I didn't
   spend a lot of time here, but cleaning up this folder would yield significant
   savings.

SQL Server

   There were several gigabytes -- I had 2.8GB -- of older versions and
   installers in the main SQL Server folder, located at /Program Files/Microsoft
   SQL Server/110/Setup Bootstrap. If you have large databases, consider moving
   them to another drive or location and setting the default data directory to
   somewhere other than the Program Files directory on the system drive.

Miro

   I use this player for podcasts. It stores almost 1GB in something called the
   "icon cache", located at /Users/<username>/Roaming/Participatory Culture
   Foundation/Miro/icon-cache

SmartGit

   SmartGit updates itself automatically now and they have very regular builds
   and updates, especially if you use preview releases. It never seems to delete
   these updates, instead retaining them in
   /Users/<username>/Roaming/syntevo/SmartGit/updates.

TimeSnapper 

   I use this to keep track of my day, referring to it to fill out my timesheet.
      Screen captures are located in
   /Users/<username>/Local/TimeSnapper/Snapshots.
      The default settings are to capture 100%-quality PNG files for all
   monitors
      every ten seconds. I have two large monitors and the default 5GB cache
   fills
      up in less than a day. This is not very helpful and wastes a lot of space.
      Instead, I recommend these settings:


        * File Type: JPG
        * Resolution: 50%
        * Quality: 50%
        * Interval: 60 seconds
        * Remove images older than: (not set)
        * Maximum allowed space: 1000MB

Sandcastle

   If you build XML documentation locally, you might have a sizable cache left
   over from the last build. I had over 800MB in the
   \Users\<username>\AppData\Local\EWSoftware\Sandcastle Help File Builder\Cache

Java

   [image]Java also likes to update itself regularly and never throws away its
   older versions. Unless you know that you absolutely need a specific version,
   you can throw away the older versions found in
   C:\Users\marco\AppData\LocalLow\Sun\Java

GhostDoc

   The Visual Studio documentation extension keeps quite an extensive cache in
   the \Users\<username>\AppData\Local\SubMain\Cache directory.

JetBrains

   [image]This is another company that squirrels away all of its installers for
   its various products -- I use DotPeek, DotCover, DotTrace, ReSharper,
   PhpStorm and 0xDBE -- in this folder \Users\marco\AppData\Local\JetBrains.
   Feel free to throw away old installations and installers.

MSOCache

   This mysterious folder located at the root of the system drive has been
   around since time immemorial. It appears to be 0 bytes when examined with a
   standard user. When you run TreeSize in administrator mode, though, you'll
   see that it's 2.4GB of ... stuff. This stuff is apparently installers for all
   of the office products that you have installed on your machine. They are
   cached in this folder in order to avoid requesting installation media if
   Office decides to install something on-the-fly. That's right: if you elect
   not to install certain features to avoid wasting drive space, Office obliges
   by putting all of the stuff you didn't install into a 2.5GB directory that
   you can't delete. Documentation is spotty, but "this article"
   <http://en.kioskea.net/faq/12161-how-to-delete-the-msocache> claims that you
   can remove it by using the standard disk-cleanup tool.

This list is meant to show where space is being wasted on a Windows developer
machine. I wasn't able to find a way to remove all of these, but cleaned up what
I could quickly clean up.

If you're really tight on space, you can turn off hibernation -- which uses 13GB
on my machine -- or reduce the size of the page file -- which is 6GB on my
machine. And, as mentioned above, "Scott Hanselman's guide"
<http://www.hanselman.com/blog/GuideToFreeingUpDiskSpaceUnderWindows81.aspx> is
quite helpful.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=2962</guid>
    <title><![CDATA[How to configure Visual Studio 2013 with licenses from a multi-pack]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=2962</link>
    <pubDate>Sat, 22 Feb 2014 23:21:20 +0100</pubDate>
    <description><![CDATA[Published by marco on 22. Feb 2014 23:21:20
Updated by marco on 22. Feb 2014 23:22:59
------------------------------------------------------------------------

The following article was originally published on the "Encodo blogs"
<http://encodo.com/en/blogs.php?entry_id=359> and is cross-published here.

"If you're only interesting in what we promised to show you in the title of the
article, then you can jump to the "tl;dr at the end" <#tldr>."

[Silver Partnership]

Encodo is a member of the Microsoft Partner Program with a Silver Competency. We
maintain this competency through a combination of the following:

  * A yearly fee
  * Registration of .NET products developed by Encodo (Punchclock and Quino in
    our case)
  * Customer endorsements for .NET products that Encodo has developed
  * Competency exams

This involves no small amount of work and means that the competency isn't that
easy to get. You can also use Microsoft competencies (e.g. MCSE) but we don't
have any of those (yet).

We've had this membership for a while in order to get partner benefits, which
basically translates to having licenses for Microsoft software at our disposal
in order to develop and test .NET software. This includes 10 licenses for all
premium versions of Visual Studio, up to and including the latest and greatest.

[The partner web site]

In previous versions, we were able to go to the partner web site and, after a
lot of effort, get license keys for our 10 licenses and distribute them among
our developers.

I mention the effort only because the partner site(s) and page(s) and
application(s) are so notoriously hard to navigate. Every year, Microsoft
improves something on the site, generally to the style but not the usability. I
pluralized the components above because it's hard to tell how many different
teams, applications and technologies are actually behind the site. [1]

[image]

  * You have to log in with your official LiveID but some pages mysteriously
    don't use the common login whereas others do use it and still others just
    log you out entirely, forcing you to log in again.
  * Some pages work in any browser whereas others highly recommend using
    Internet Explorer, some even recommending version 11. If you don't use IE,
    you'll always wonder whether the site failed to work because it's so buggy
    or because your browser is not properly supported.
  * The downloads page includes Windows operating systems and server software of
    all kinds as well as productivity software like Office and Visio but
    mentions nothing about Visual Studio.

It's basically always been a mess and still is a mess and our suspicion is that
Microsoft deliberately makes it hard to redeem your licenses so that you'll
either (A) just purchase more licenses via a channel that actually delivers them
or (B) call their for-fee hotline and spend a bunch of money waiting on hold
before you get forwarded from one person to another until finally ending up with
someone who can answer your question.

--------------------------------------------------------------------------------


[1] You can confirm our impressions just by looking at the screenshots attached
    below.

[The convoluted path to licenses]

That question being, in case we've forgotten, "how can I please get your
software to recognize the licenses that I purchased instead of threatening me
that it will go dark in 90 days?"

The magical answer to that question is below.

First, what are we actually trying to accomplish? We have a multi-pack license
and we want some way of letting our users/developers register products. In most
cases, this still works as it always has: get a license key and enter
it/register it with the local installation of the product (e.g. Office, Windows,
etc.)

With Visual Studio 2013 (VS2013), things are slightly different. There are no
multi-pack license keys anymore. Instead, users log in to their Visual Studio
with a particular user. VS2013 checks that account for a license on the MSDN
server and enables its functionality accordingly. If you have no license
registered, then you get a 90-day trial license.

If the license is a multi-pack and the user accounts are individual...how does
that work? Easy: just associate individual users with the partner account and
assign them licenses. However, this all works via MSDN, so it's not enough to
just have a Windows Live account. That user must also be registered as an MSDN
subscriber.

So, for each user, you're going to have to do the following:

   1. Get them a Windows Live account if they don't already have one
   2. Add that account ID to the partner account
   3. Enable that user to get premium benefits (this can take up to 72 hours;
      see below for more detail)
   4. Register that Windows Live account as an MSDN subscriber
   5. Enter your credentials into VS2013 or refresh your license

[The solution (with screenshots)]

Sounds easy, right?. Once you know what to do, it's not so bad. But we had a lot
of trouble discovering this process on our own. So here are the exact steps you
need to take, with screenshots and hints to help you along.

   1. Log in with the Windows LiveID that corresponds to the account under which
      the Silver Membership is registered.
   2. Navigate to the account settings where you can see the list of members
      registered with your account.
   3. Add the email address of the user to that list of members [2]
   4. Make sure that the "Premium" box is checked at the end of the list [3]
   5. A six-character TechID will be generated for that user. The site claims
      that it can take up to 72 hours for this number to be ready for use on the
      MSDN site. Our experience was that it took considerably less time.
   6. Give that user their ID and have them register with MSDN to create a
      subscriber
      1. Get the Tech ID for your user from the steps above;
      2. Browse to "the MSDN home page" <http://msdn.microsoft.com/> and click
         "Downloads" [4]
      3. Click "MSDN Subscriptions" in the sub-menu under "Downloads" (totally
         intuitive, right?) [5]
      4. Ignore the gigantic blue button enticing you to check out "Access
         benefits" and click "Register a subscription" [6]
      5. You'll finally be on the page to "Activate your subscription". Use the
         exact same address as registered with the partner account and enter
         your Tech ID. [7]
      
   7. Once the user has a subscriber, that user can log in to VS2013 from the
      registration dialog to enable that license [8]

Logging in has other benefits: you can store your VS2013 settings on the Live
server and use them wherever you work with VS2013 and have logged in.

[1] [image]



[1] [image]


[1] [image]


[1] [image]


[1] [image]


[1] [image]


[1] [image]

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=2487</guid>
    <title><![CDATA[Troubleshooting a misbehaving designer in Visual Studio 2010]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=2487</link>
    <pubDate>Sun, 20 Feb 2011 22:17:39 +0100</pubDate>
    <description><![CDATA[Published by marco on 20. Feb 2011 22:17:39
Updated by marco on 21. Feb 2011 07:11:33
------------------------------------------------------------------------

Anyone who's used Visual Studio 2010 [1] for a non-trivial Windows Forms project
has run into situations wherein the designer can no longer be opened. Usually,
it's because the class encounters null-reference exceptions when referencing
data that is unavailable until runtime. Those are easy to fix: just avoid
referencing that data in the constructor or load-routine while in design-mode.

However, sometimes Visual Studio has problems loading assemblies that it seems
it should have available. Sometimes Visual Studio seems to have a devil of a
time loading assemblies whose location it has quite explicitly been told.

If you like, there is a walkthrough -- with screenshots! -- at the end of this
article, which shows how to solve even the most intractable designer problems.

[A Tale of Two Platforms]

One of the troubles is that many developers have moved to 64-bit Windows in
order to take advantage of the higher RAM limits. The move to 64-bit causes some
issues with many .NET assemblies in that the developer (i.e. probably YOU)
didn't remember to take into account that an assembly might be loaded by x86
code or x64 code or some combination thereof. The designer will sometimes be
unable to load an assembly because it has been compiled in a way that cannot be
loaded by the runtime currently being used by the designer as explicitly
requested in the project settings. That said, the request is explicit as far as
Visual Studio is concerned, but implicit as far as the developer is concerned.

The only long-lasting solution is to learn how assemblies are loaded and what
the best compile settings are for different assemblies so that you will run into
as few problems as possible.

There are several considerations:

   1. It would be nice to have class libraries that can be loaded by any
      executable instead of having separate versions for x64 and x86.
   2. It would also be nice to be able to benefit from as many debugging
      features of the environment as possible (e.g. the Edit & Continue feature
      does not work with x64 builds).
   3. It would be nice to have the most optimal executable for the target
      platform. (This is usually taken to mean an executable compiled to run
      natively on the target, but turns out not necessarily to be so, as shown
      below.)

In order to help decide what to do, it's best to go to the source: Microsoft. To
that end, the article "AnyCPU Exes are usually more trouble than they're worth"
by Rick Byers
<http://blogs.msdn.com/b/rmbyers/archive/2009/06/09/anycpu-exes-are-usually-more-trouble-then-they-re-worth.aspx>
provides a lot of guidance.

  * "Running in two very different modes increases product complexity and the
    cost of testing": two different platforms equals two times as much testing.
    Build servers have to compile and run tests for all configurations because
    there can be subtle differences. [2]
  * "32-bit tends to be faster anyway": the current version of the WOW
    (Windows-on-Windows) runtime on 64-bit systems actually runs code faster
    than the native 64-bit runtime. That still holds true as of this writing.
  * "Some features aren't avai[l]able in 64-bit": the aforementioned Edit &
    Continue counts among these, as does historical debugging if you're lucky
    enough to have a high-end version of Visual Studio.

Given all of the points made above and assuming that your application does not
actually need to be 64-bit (i.e. it needs to address more RAM than is available
in the 32-bit address space), your best bet is to use the following rules as
your guide when setting up default build and release settings.

  * Pure class libraries should always be compiled for "Any CPU" (i.e. able to
    be loaded by both x86 and x64 assemblies).
  * Executables should always be compiled as x86.
  * Unit-test assemblies should also be compiled as x86 in order to be able to
    use Edit & Continue.

[Where Did You Find That?!]

Once you've set up your build configuration appropriately and rebuilt
everything, you will avoid many design-time errors. 

Though not all of them.

Visual Studio has a nasty habit of loading assemblies wherever it can find one
that matches your requirements, regardless of the location from which you linked
in the assembly. If you look in the project file for a C# Visual Studio project
(the .csproj-file), you'll actually see an XML element called <HintPath> after
each assembly reference. The name is appropriately chosen: Visual Studio will
look for an assembly in this location first, but will continue looking elsewhere
if it's not there. It will look in the GAC and it will look in the bin/Debug or
bin/x86/Debug folder to see if can scrounge up something against which to link.
Only if the assembly is not to be found anywhere will Visual Studio give up and
actually emit an error message.

At "Encodo" <http://encodo.com>, we stopped using the GAC entirely, relying
instead on local folders containing all required third-party libraries. In this
way, we try to control the build configuration and assemblies used when code is
downloaded to a new environment (such as a build server). However, when working
locally, it is often the case that a developer's environment is a good deal
dirtier than that of a build server and must be cleaned.

Though Visual Studio offers an option to clean a project or solution, it doesn't
do what you'd expect: assemblies remain in the bin/Debug or bin/x86/Debug
folders. We've added a batch command that we use to explicitly delete all of
these folders so that Visual Studio once again must rely on the HintPath to find
its assemblies.

If you find yourself switching between x86 and x64 assemblies with any amount of
frequency, you will run into designer loading errors when the designer manages
to find an assembly compiled for the wrong platform. When this happens, you must
shut down Visual Studio, clean all output folders as outlined above and re-open
the solution.

[Including References with ReSharper]

A final note on references: if you adopt the same policy as Encodo of very
carefully specifying the location of all external references, you have to watch
out for ReSharper. If ReSharper offers to "reference assembly X" and "include
the namespace Y", you should politely decline and reference the assembly
yourself. ReSharper will reference the assembly as expected but will not include
a HintPath so the reference will be somewhere in the bin/Debug or bin/x86/Debug
folder and will break as soon as you clean all of those directories (as will be
the case on a build server).

[Designer Assemblies]

This almost always works, but Visual Studio can still find ways of loading
assemblies over which you have little to no control: the designer assemblies.

In all likelihood, you won't be including the designer assemblies in your
third-party binaries folder for several reasons:

   1. They are not strictly required for compilation
   2. The are usually a good deal larger than the assembly that they support and
      are only used during design-time
   3. Design-time assemblies are usually associated with visual component
      packages that must be installed anyway in order for a compiled executable
      to be considered licensed. [3]

For all of the reasons above, it's best not to even try to get Visual Studio to
load designer assemblies out of a specific folder and just let it use the GAC
instead.

[Walkthrough: Solving a Problem in the Designer]

Despite all of the precautions mentioned above, it is still possible to have a
misbehaving designer. The designer can be so mischievous that it simply refuses
to load, showing neither a stack not an error message, keeping its reasons to
itself. How do we solve such a problem?

You know you have a problem when the designer presents the following view
instead of your form or user control.

[image]

In the worst case, you will be given neither a useful error message nor a stack
from which to figure out what happened.

[image]

There's a little link at the top -- right in the middle -- that you can try that
may provide you with more information.

[image]

The designer will try to scare you off one last time before giving up its
precious secrets; ignore it.

[image]

At this point, the designer will finally show the warnings and errors that
describe the reason it cannot load. [4]

[image]

The text is a bit dense, but one thing pops out immediately:

[image]

It looks like Visual Studio is checking some cached location within your
application settings to find referenced assemblies and their designer
assemblies. [5] This is a bit strange as Visual Studio has been explicitly
instructed to load those assemblies from the third-party folder that we
carefully prepared above. Perhaps this cache represents yet another location
that must be cleared manually every once in a while in order to keep the
designer running smoothly.

[A]DevExpress.XtraLayout.LayoutControl cannot be cast to
[B]DevExpress.XtraLayout.LayoutControl. 
Type A originates from 'DevExpress.XtraLayout.v10.2, Version=10.2.5.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a' 
in the context 'LoadNeither' at location 
'C:\Documents and Settings\Marco\Local Settings\Application
Data\Microsoft\VisualStudio\10.0\ProjectAssemblies\kn8q9qdt01\DevExpress.XtraLayout.v10.2.dll'.

Type B originates from 'DevExpress.XtraLayout.v10.2, Version=10.2.4.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a'
in the context 'Default' at location
'C:\WINDOWS\assembly\GAC_MSIL\DevExpress.XtraLayout.v10.2\10.2.4.0__b88d1754d700e49a\DevExpress.XtraLayout.v10.2.dll'.

This will turn out to be a goose chase, however. [6] The problem does not lie in
the location of the assemblies, but rather in the version. We can see that the
designer was attempting to load version 10.2.4.0 of the third-party component
library for DevExpress. However, the solution and all projects were referencing
the 10.2.5.0 version, which had not been officially installed on that
workstation. It was unofficially available because the assemblies were included
in the solution-local third-party folder, but the designer files were not.

Instead of simply showing an error message that the desired version of a
required assembly could not be loaded, Visual Studio chose instead to first hide
the warnings quite well, then to fail to mention the real reason the assembly
could not be loaded (i.e. that it conflicted with a newer version already in
memory). Instead, the designer left it up to the developer to puzzle out that
the error message only mentioned versions that were older than the current one.
[7]

From there, a quick check of the installed programs and the GAC confirmed that
the required version was not installed, but the solution was eminently
non-obvious.

That's about all for Visual Studio Designer troubleshooting tips. Hopefully,
they'll be useful enough to prevent at least some hair from being torn out and
some keyboards from being thrown through displays.

--------------------------------------------------------------------------------


[1] All tests were performed with the SP1 Beta version available as of
    Mid-February 2010.


[1] One such difference is how hash-codes are generated by the default
    implementation of GetHashCode(): the .NET implementation is optimized for
    speed, not portability so the codes generated by the 32-bit and 64-bit
    runtimes are different.


[1] In the case of SyncFusion, this means the application won't even compile; in
    the case of DevExpress, the application will both compile and run, but will
    display a nag screen every once in a while.


[1] If you're lucky, of course. If you're unlucky, Visual Studio will already
    have crashed and helpfully offered to restart itself.


[1] Then it encountered a null-reference exception, which we can only hope will
    actually get fixed in some service pack or other.


[1] I tried deleting this folder, but it was locked by Visual Studio. I shut
    down Visual Studio and could delete the folder. When I restarted and
    reloaded the project as well as the designer, I found to my surprise that
    Visual Studio had exactly recreated the folder structure that I had just
    deleted. It appears that this is a sort of copy of the required assemblies,
    but the purpose of copying assemblies out of the GAC to a user-local
    temporary folder is unclear. It stinks of legacy workarounds.


[1] In the case of DevExpress, this didn't take too long because it's a large
    component package and the version number was well-known to the developers in
    the project. However, for third-party components that are not so frequently
    updated or which have a less recognizable version number, this puzzle could
    have remained insoluble for quite some time.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=2274</guid>
    <title><![CDATA[How Do I View Available Characters in OS X?]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=2274</link>
    <pubDate>Mon, 21 Dec 2009 22:19:38 +0100</pubDate>
    <description><![CDATA[Published by marco on 21. Dec 2009 22:19:38
------------------------------------------------------------------------

There's a keyboard viewer stashed away in a very unintuitive place. These
instructions assume you are using OS X English, but include steps for both
Leopard and Snow Leopard (versions 10.5.x and 10.6.x respectively). Click the
footnote links to jump to the screenshots below.

   1. Select "System Preferences..." from the Apple in the top-left corner.
   2. In Leopard, select the "International" icon in the top row (in Snow
      Leopard, it's called "Language & Text")
   3. In Leopard, select the "Input Menu" page. In the list on that page, you
      can enable the "Keyboard viewer". [1] An icon with the Flag representing
      your current input format (probably US English or Swiss German) shows up
      in the menu bar at the top-right of the screen. (In Snow Leopard, the page
      is called "Input Sources" and the item in the list is labeled as "Keyboard
      and Character Viewer". [2])
   4. Click the newly enabled icon in the menu bar to show a menu of options.
      [3] [4]
   5. Select "Show Keyboard Viewer" to show a virtual keyboard. [5]
   6. Press the "alt/option", "Command" and "Control" keys both alone and in
      combination to see what effects they have.

But wait, there's more! If you need to make an accented character not directly
supported by your keyboard, you can use some special key combinations to insert
a "floating" diacritical mark [6]; that mark is automatically applied to the
next character you type (within the capabilities of the selected font and
encoding, of course).

  * Alt/Option+u: Umlaut (e.g. ä, ë, ï, ö, ü)
  * Alt/Option+e: Acute (e.g. á, é, í, ó, ú)
  * Alt/Option+`: Grave (e.g. à, è, ì, ò, ù)
  * Alt/Option+i: Circumflex (e.g. â, ê, î, ô, û)
  * Alt/Option+n: Tilde (e.g. ã, õ, ñ)

[Screenshots]

[1] [image]


[1] [image]


[1] [image]


[1] [image]


[1] [image]

--------------------------------------------------------------------------------


[1] Only Western diacritical marks are supported, as far as I know.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=2237</guid>
    <title><![CDATA[Backup, Recovery &amp; Optimization Scripts]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=2237</link>
    <pubDate>Thu, 05 Nov 2009 10:51:26 +0100</pubDate>
    <description><![CDATA[Published by marco on 5. Nov 2009 10:51:26
Updated by marco on 5. Nov 2009 19:47:04
------------------------------------------------------------------------

This article was originally published on the "Encodo Blogs"
<http://encodo.com/en/blogs.php?entry_id=188>. Browse on over to see more!

--------------------------------------------------------------------------------


Perforce servers have a checkpointing mechanism in order to back up the server
metadata. That checkpoint, along with the depot data and a journal file (for
changes made since the checkpoint was taken) are enough to restore a Perforce
database.

Here at Encodo, we take a checkpoint every evening right before the depot files
are backed up. We retain a few days worth of these checkpoints, just in case.
Since our server runs on Debian Etch (Linux), we have a Bash script to do all of
this (included below). The comments in the script should be enough to get a gist
of what's going on; adjust the values of the variables at the top of the script
to correspond to your installation.


#!/bin/bash

BACKUP_DIR=/home/p4/backup
DEPOT_DIR=/home/p4/srvroot
P4=/opt/p4/p4
HOST=p4:1666
USER=root
PASSWORD=password
DAYS_TO_KEEP=3

# Verify the depot
$P4 -p $HOST -u $USER -P $PASSWORD verify -q //... > /dev/null
$P4 -p $HOST -u $USER -P $PASSWORD verify -u -q //... > /dev/null 2> /dev/null

# Take a checkpoint
$P4 -p $HOST -u $USER -P $PASSWORD admin checkpoint > /dev/null

# Move all journal and checkpoint files to the backup folder
mv $DEPOT_DIR/journal.* $BACKUP_DIR
mv $DEPOT_DIR/checkpoint.* $BACKUP_DIR

# Remove old checkpoint and journal files
find $BACKUP_DIR/journal.* -mtime +$DAYS_TO_KEEP -exec rm -f {} \; > /dev/null
2> /dev/null
find $BACKUP_DIR/checkpoint.* -mtime +$DAYS_TO_KEEP -exec rm -f {} \; >
/dev/null 2> /dev/null

Once you have regular checkpoints for backup, your data is safe. However, after
a while, a Perforce server accumulates no small amount of cruft in its metadata,
slowing down some common operations. A Perforce server can be optimized by
replacing the database metadata with the contents of a checkpoint. When metadata
is restored from a checkpoint, that metadata is imported in a pruned, balanced
and optimized way, ensuring optimal performance.

In order to do this, you basically take a checkpoint, stop the server, restore
the checkpoint and restart the server. Luckily for you, Encodo has a Bash script
for that as well. The basic process is described in more detail in "Perforce
database maintenance" by Rusty Jackson <http://blog.perforce.com/blog/?p=187>.
The comments in the script should be enough to get a gist of what's going on;
adjust the values of the variables at the top of the script to correspond to
your installation.


# This script describes a way of optimizing and cleaning the metadata for a
Perforce server

# The following steps are copied from the following URL:
# - <http://blog.perforce.com/blog/?p=187>

# - Stop your server
# - Take a checkpoint
# - Move your existing db files to a save directory
# - Recover from the checkpoint
# - Check for errors during restore
# - Restart your server
# - Delete the files from the save directory

# Instead of deleting the old database files immediately after the process, we
# delete them during the next run instead.

BACKUP_DIR=/home/p4/backup
DEPOT_DIR=/home/p4/srvroot
P4D=/opt/p4/p4d
LOG_FILE=/var/log/p4d-error

# - Take a checkpoint
echo "Taking a checkpoint..."
/opt/scripts/p4d/makecheckpoint.sh

# - Stop your server
echo "Stopping the Perforce server..."
/etc/init.d/p4d stop

# - Delete the files from the save directory
echo "Backing up current database..."
rm -R $BACKUP_DIR/db

# - Move your existing db files to a save directory
mkdir $BACKUP_DIR/db
mv $DEPOT_DIR/db.* $BACKUP_DIR/db/

# - Recover from the checkpoint
CHECKPOINT_FILE=`ls -h --sort=time $BACKUP_DIR/checkpoint* | head -1`

echo "Do you wish to restore from checkpoint '$CHECKPOINT_FILE'?"
select yn in "Yes" "No"; do
  case $yn in
    Yes ) echo "Restoring checkpoint..."; su p4 -c "$P4D -r $DEPOT_DIR -L
$LOG_FILE -jr $CHECKPOINT_FILE"; break;;
    No ) echo "Optimization aborted; restoring previous database..."; mv
$BACKUP_DIR/db/db.* $DEPOT_DIR/; break;;
  esac
done

# - Restart your server
/etc/init.d/p4d start


]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=2187</guid>
    <title><![CDATA[Perforce Branching Specification Typo]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=2187</link>
    <pubDate>Thu, 25 Jun 2009 22:11:08 +0200</pubDate>
    <description><![CDATA[Published by marco on 25. Jun 2009 22:11:08
------------------------------------------------------------------------

This article was originally published on the "Encodo Blogs"
<http://encodo.com/en/blogs.php?entry_id=171>. Browse on over to see more!

--------------------------------------------------------------------------------


At Encodo, we use the Perforce source control system. Recently, I created a
branch specification in order to maintain bug fixes in a released product. See
below:


//depot/branches/customername/versionnumber/projects/encodo/quino...
//depot/projects/encodo/quino/...


Naturally, the next thing I did was to branch the files under
//depot/projects/encodo/quino/ to the branch, using the P4V client. It displayed
the new changelist, but did not update the statuses of the files therein (there
were only a couple of hundred files). Strange. Stopping the command progress and
refreshing manually also didn't help and, within a few seconds, complaints
rained in from coworkers that Perforce had stopped responding. 

Even stranger.

I've been using Perforce for at least a dozen years and the server has never
crashed or hung. That's why you can let your support contract lapse for years
without suffering any consequences.

A quick look into the processes list on the server showed several forks of the
P4 server, each pulling as much of the CPU as it can. The processes quit after a
while, but the commands never seemed to return. Ah, so it wasn't even really
hanging or crashed, it was just very, very busy with something. So, I restarted
the server just to clear out the busy processes and tried to connect again;
still no luck and both the P4V or P4Win clients could not retrieve the
information they needed.

Since I had just integrated the files in that branch, I suspected it had
something to do with those files, so I needed to revert them. To the rescue came
the P4 command-line program, with which I could revert all files in the
offending changelist without actually retrieving the status of those files. The
changelist reverted successfully...and all the GUI clients were magically back
online.

Curiouser and curiouser.

I branched the files again and ran into the exact same problem; at least it was
reproducible. Instead of reverting the files, I just submitted them from the
command line instead and went to look at the branch in P4V. It could display the
files in the depot without any problem but, instead of all of the projects being
in the //depot/branches/customername/versionnumber/projects/encodo/quino, as
expected, the projects were one level higher, in the encodo folder, but each was
prepended by the word "quino".

Hmmm...those projects seem to have been branched incorrectly.

Before blaming Perforce for an error that had never, ever happened before, I
took a look at the branch specification again and noticed that I'd introduced a
small typo in the specification:


//depot/branches/customername/versionnumber/projects/encodo/quino[ ]...
//depot/projects/encodo/quino[/]...

The missing forward-slash is highlighted in green above. It's relatively easy to
miss, but once you see it, it's obvious why the files and folders branched as
they did. What's not so obvious is why the Perforce server had such a tough time
handling requests for the statuses of these files. [1] At any rate, should you
run into a similar problem, check those branch specifications!

The Perforce clients have only gotten nicer over the years and the latest beta
of P4V (June 2009) is the nicest yet, but it would be nice if they finally
offered better support for their mapping format. The workspace definitions
include a visual editor that is quite good, but a sanity check with "are you
sure you mean what I think you mean?" checks for common errors would be a
welcome addition.

--------------------------------------------------------------------------------


[1] The Perforce server version we use is slightly older---we let the support
    contract lapse because it is so stable and does what we need---so newer
    versions may not have this problem. This is the version we are using:
  
   P4D/LINUX24X86/2006.1/104454 (2006/08/02)

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=2181</guid>
    <title><![CDATA[How To Report a Software Bug (or any other Problem)]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=2181</link>
    <pubDate>Tue, 16 Jun 2009 22:35:05 +0200</pubDate>
    <description><![CDATA[Published by marco on 16. Jun 2009 22:35:05
------------------------------------------------------------------------

Reporting a bug in software is no different than reporting any other problem you
want addressed: the more specific you are, the better and quicker service you're
likely to get. 

   1. Always assume that the person responsible for the problem you want fixed
      is just as interested as you are in fixing it. If you're working with good
      people, that's usually the case.
   2. Always assume that good people have 1000 things to do, but will still
      prioritize your issue higher if they think they can take care of it
      quickly.
   3. Scientifically-minded problem-solvers determine whether a problem can be
      solved by coming up with hypotheses and testing them.
   4. Reproducibility is key: very few problems can be solved by just thinking
      about how the problem could have arisen and implementing a solution. Even
      given such a solution, it is highly untestable (how can you verify that
      you've fixed a problem that you can't even reproduce?). Instructions for
      quickly -- or, at the very least, reliably -- reproducing the problem are
      paramount.
   5. Therefore, if your report includes the information a problem-solver needs
      in order to reproduce the problem, form a hypothesis and test it quickly,
      it stands a much better chance of getting addressed quickly.
   6. Even if you do all of this, it does not necessarily mean that your problem
      will be solved quickly, but it means that you'll find out much more
      quickly whether or not you've got a tough issue on your hands. You may
      have to wait for a solution, but at least you know you're not waiting two
      weeks for someone to even look at your problem.
   7. Lying about the severity of the problem is not a good way to increase the
      priority of your issue, especially if you're not providing enough
      information. For example, reporting that "NOTHING'S WORKING!!!" when you
      have, in fact, discovered a typo or a broken link is unlikely to inspire a
      reaction more than once or twice. Bad reputations are hard to un-earn.

You probably wouldn't be surprised at all to find how long it takes to train
people to make good bug reports. We have one client to whom we send punishing
support invoices every month because only one of their employees knows how to
provide information from which we can even attempt to reproduce a problem. It's
a shame because many problems that look intractable in the absence of a good bug
report are solved quite easily and quickly once that information is finally made
available (usually by twisting some arms).

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=2174</guid>
    <title><![CDATA[OS X Leopard: Restoring from Backup (Ad hoc)]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=2174</link>
    <pubDate>Sun, 07 Jun 2009 14:47:22 +0200</pubDate>
    <description><![CDATA[Published by marco on 7. Jun 2009 14:47:22
------------------------------------------------------------------------

Say you're excited about having finally upgraded from OS X Tiger to Leopard more
than two years after everyone else has already made the switch. Let's say you're
not so excited that you completely lose your head and do a clean install without
making a backup, but excited enough to forget that several Apple applications
have rather convenient backup features baked right into them.

OS X offers a Migration Assistant with which you can migrate settings from
another OS X installation or a Time Machine backup. However, it doesn't see a
SilverKeeper backup (a one-to-one copy of all files) as a valid OS X
installation, so you can't restore settings from that kind of a backup with this
assistant.

It's not the end of the world, though. Unlike Windows applications, which use
installers to place entries in the registry and put files into the appropriate
places, OS X applications are generally a drag & drop installation. So that's
the application itself, but what if you wanted to restore the preferences and
user data that you so painstakingly configured and created in your old
installation? It turns out that that's not so hard either, once you know where
things are.

OS X applications only create files within your user folder [1] -- and only your
user folder -- and then in at most three folders:

   1. Preferences: Application configuration data
   2. Application Support: Application data which, if lost, cannot be recovered
   3. Caches: Application data which makes the application faster, but can
      always be reconstructed by combining data from Application Data,
      Preferences and other non-volatile sources.

Some Apple applications don't stick exactly to this structure (e.g. Stickies,
Safari, Mail, etc.), but third party applications are generally very good about
this. One system-wide file you might want to copy is the ~/Keychain folder,
which kept track of all of your passwords (dozens of which you've probably
completely forgotten by now). For all other application-specific data, see the
list below for tips.

Mail

   Mail isn't so tricky to restore. From the Preferences folder, copy any files
   whose name begins with com.apple.mail [2]. Copy the ~/Mail folder to your new
   user folder and you're done. The ~/Mail Downloads folder seems to be some
   sort of cache and isn't 100% necessary, but shouldn't hurt either. When you
   start Mail in OS X Leopard, it will notify you that it is upgrading your mail
   store and voila! You've got mail.

iTunes

   The iTunes library is stored entirely under ~/Music/iTunes. If you use the
   default settings, letting iTunes keep track of the music data, it suffices to
   copy this folder; if you have music stored elsewhere, it's up to you to make
   sure the OS X Leopard iTunes knows where those files are.

iPhoto

   As with iTunes, iPhoto's data is located outside of the ~/Library, instead
   using the ~/Pictures/iPhoto folder. Just copy this over and you've got your
   pictures back.

Safari

   If you use Safari, your bookmarks, saved form values and other preferences
   are in ~/Safari and your cookies are in ~/Cookies, should you wish to rescue
   them.

Tunnelblick

   Tunnelblick is an OpenVPN GUI for OS X; it stores its configuration data in
   ~/openvpn instead of the Preferences folder. (This is most likely a
   requirement of the Unix-based OpenVPN subsystem.)

Dictionaries

   If you added words to one or more dictionaries, those files are stored in
   ~/Spelling

Stickies

   If you use the sticky notes application from Apple, you can just copy the
   ~/StickiesDatabase file over and you'll have your notes back.

Address Book

   The best solution here is to remember to back up this application's data
   using the internal backup available from the File menu in the application
   itself. However, surprisingly, it only uses a folder in Application Support.
   Go Apple! Way to follow your own guidelines. Just copy this folder over and
   you've got your address book back.

iCal

   As with the address book, the best solution is to use the internal backup
      available from the File menu in the application itself. Whereas under
   Tiger,
      iCal actually stored its data in the ~/Application Support folder, in
      Leopard, its data has moved to ~/Calendars. Simply copying the folders
   over
      isn't going to work here, unfortunately; it's a bit more complicated than
      that. Here's a rough guide:


         1. In the backup, browse to the ~/Application Support/iCal/Sources
   folder;
            there, you will see one folder for each of your calendars, though
   with
            very cryptic-looking names.In order to tell which calendar is which,
   open a cryptically-named folder
         and quick-view the Info.plist file (press Space when the file is
   selected
         in the Finder); you should something like the following:

   <?xml version="1.0" encoding="UTF-8"?>
         <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
         "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
         <plist version="1.0">
         <dict>
         	<key>Key</key>
         	<string>3BFD9C8E-88A4-4EEF-A8E2-0AC4E153E53F</string>
         	<key>Title</key>
         	<string>Work</string>
         	<key>Type</key>
         	<string>com.apple.ical.sources.naivereadwrite</string>
         </dict>
         </plist>

         The contents of the string element (highlighted above) immediately
   after
         the key element with the contents "Title" is the name of the calendar.
   If
         you were subscribed to calendars, then you don't need to import those;
   you
         can just re-add the subscription URL to iCal directly.
         2. For each calendar you wish to import, from iCal select File, then
            Import... from the menu.
         3. Select the Import an iCal file option.
         4. Select the file ending in .ics from the folder containing the
   calendar
            you wish to import.
         5. Choose a calendar to which you wish to import the data. You can
   either
            import the data into an existing calendar (as you will likely do
   with
            the "Home" and "Work" calendars) or just create a new one.
         6. Press "Ok" to import the data and restore your calendar.

Other Third-party Applications

   As mentioned above, it's usually sufficient (in my experience, anyway) to
   copy data from Preferences and Application Support for the applications you
   want to transfer. This worked for Adium, Opera, TextMate, Cyberduck, Firefox,
   TriTag, CSSEdit, Delicious Library and Fission, but your mileage may vary.

--------------------------------------------------------------------------------


[1] Referred to throughout the article with the path ~/.


[1] Most applications have either a single preferences file or create a whole
    sub-folder within the ~/Preferences folder. They all include their
    application name somewhere in either the folder or file name.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=2173</guid>
    <title><![CDATA[OS X Leopard: Uninstalling Dev and Unix Tools]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=2173</link>
    <pubDate>Sat, 06 Jun 2009 23:11:51 +0200</pubDate>
    <description><![CDATA[Published by marco on 6. Jun 2009 23:11:51
------------------------------------------------------------------------

Installing OS X Leopard on my old 1.4GHz PowerPC 1GB Mac Mini went surprisingly
well. I used Lacie SilverKeeper to back up my Tiger hard drive before wiping it
out and doing a clean installation. I avoided installing all of the extra
languages and printer drivers and managed to save several gigabytes of hard
drive space for other stuff.

The only thing I had trouble installing was rdiff-backup, which is a UNIX
utility for performing backups. OS X Leopard sports the vaunted Time Machine for
its own backups, but I run a Linux Debian Etch server, which I back up across
the wire using rdiff-backup. I followed the instructions for installing on OS X
-- which were much the same as what I'd once done for OS X Tiger -- but lost
patience. In order to install this UNIX utility, I need to build it from source.
In order to have a working C-compiler, I need gcc. The only known way to install
a reliable version of that is to install the developer tools from Apple, which
means installing 2GB worth of XCode. It also means installing an extra 600MB of
"UNIX-compatible" command-line utilities on top of that, which are probably what
the build system in MacPorts or Fink is going to need. Oh yeah, MacPorts and
Fink are Linux-style package managers for OS X which also download and install
an uncomfortably large number of files.

Once you've bit the bullet and installed MacPorts and XCode, you can try
installing the packages for rdiff-backup, if you have the patience. Compiling on
this poor old machine is like watching paint dry ... and MacPorts compiles
everything. Though Leopard sports version 2.5 of Python, MacPorts was halfway
through compiling its own 2.4 version (after setting up other things for what
must have been more than an hour) before I throttled it in its crib. Enough is
enough; I'm using a Mac here, for Christ's sake.

If you, like me, would like to completely undo the mistakes you've made (i.e.
you don't plan on using XCode yet and don't plan on using any other Unix
utilities), here are some simple commands you can use to eradicate all traces of
MacPorts and XCode. [1]

To remove all installed ports applications (including half-compiled proggies),
open a Terminal window and execute:


sudo port -f uninstall installed

To remove all traces of MacPorts itself, open a Terminal window and execute:


sudo rm -rf /opt/local \
/Applications/MacPorts \
/Applications/DarwinPorts \
/Library/Tcl/macports1.0 \
/Library/Tcl/darwinports1.0 \
/Library/LaunchDaemons/org.macports.* \
/Library/StartupItems/DarwinPortsStartup \
/Library/Receipts/MacPorts*.pkg \
/Library/Receipts/DarwinPorts*.pkg \
~/.macports

To remove XCode, open a Terminal window and execute:


sudo /Developer/Library/uninstall-devtools --mode=all

There. Now you're back to a relatively clean, standard OS X installation without
a lot of Unix-y clutter.

--------------------------------------------------------------------------------


[1] Tips for removal found at the "MacPorts FAQ"
    <http://trac.macports.org/wiki/FAQ#WhyisoptlocalthedefaultinstalllocationforMacPorts>
    and "How to Uninstall Xcode"
    <http://macdevelopertips.com/xcode/how-to-uninstall-xcode.html>.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=2178</guid>
    <title><![CDATA[How to Expand Your Music Library]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=2178</link>
    <pubDate>Sat, 06 Jun 2009 13:18:48 +0200</pubDate>
    <description><![CDATA[Published by marco on 6. Jun 2009 13:18:48
Updated by marco on 6. Jun 2009 14:07:35
------------------------------------------------------------------------

There are many online services available these days through which a user can
access a vast music library. One of the most popular is the iTunes Music Store,
which offers a relatively large library of music for sale. It's not even
DRM-encoded anymore and has thus become more attractive. Amazon also has a
pretty extensive library and has offered its music DRM-free from the beginning.

Those are sources where you pay for a license to an MP3 file. You can put it on
any many gadgets as you like.

What if you're at a computer and just want to listen to some music, preferably
music you've chosen yourself? There are a lot of services out there, with LastFM
and Pandora holding quite a large market share between them. A lot of people
just type song names into YouTube and watch the video. Recently, however, music
search services have sprouted up like mushrooms, sporting Flash-based interfaces
and varying levels of usability and library size. These services basically scour
the Internet for MP3 files using robots similar to Google's.

One of the best, Seeqpod, was recently torpedoed by the RIAA and their site has
been shut down. They even had a random stream of music from which you could pick
song ideas which was a nice way to lose a few hours. "Groove Shark"
<http://grooveshark.com/> is a wonderful replacement, though, with a huge
library and a nice playlist function.

I recently ripped a bunch of music from old cassettes (if you don't know what
those are, "let me Google that for you" <http://lmgtfy.com/?q=cassettes>). Some
of the quality is lacking, what with some of the cassettes being almost 20 years
old and the integrity of the magnetic recordings having suffered over the years.
So, what to do? Searching on the for-pay music services is mostly useless, as
they don't even offer the music I'm looking for -- ignore for now whether this
is for reasons of taste or rarity or both -- and, whereas LastFM often has
references to individual songs, they rarely ever have the actual song, instead
inviting me to be the "first to upload it!" GrooveShark, however (and Seeqpod
before it) does a remarkably good job of locating the missing/damaged tracks in
a decent quality.

Well, that's kind of cool. You can listen to music anytime you like as long as
it doesn't disappear from the 'net at some point. You can't really have this
music to load onto your iPod or other music device, can you?

Well, sure you can; you just need a little technical know-how and some patience.

The Flash applet downloads the MP3 file as it plays it, saving it in your
browser cache. That file lays around with a weird filename in the browser cache
until your browser decides it no longer needs to keep it around and throws it
out. That doesn't usually happen for a while, so the MP3 you want is technically
on your hard drive for long enough for you to grab it and copy it somewhere for
safe-keeping (i.e. "keeping").

The following instructions are for my setup: OS X Leopard using the latest Opera
browser beta. The principles are likely to apply to other operating systems and
browsers, but the location and organization of the cache will differ
drastically. [1]

Opera stores its cache in the following folder: ~/Library/Caches/Opera/cache.
All of the files in that folder begin with "opr"; you can find the MP3 files by
sorting by file-size from largest to smallest and scanning the modification date
to see which ones were downloaded most recently. If you sort by modification
date, the number of other, smaller files in the cache will spread the larger
files over too large an area, making it harder to find them.

Well, that's how I started out anyway. I'd find the a file I deemed an MP3
candidate and copy it to the side. Of course, without a file extension or useful
file-name, it was hard to tell exactly what I had. One way to clear this up is
to just drag and drop the files onto iTunes, letting it copy the file to its
library and determine whether (A) the file is an MP3 and (B) which song it is. I
don't really like to copy stuff willy-nilly into my music library, though, so I
use TriTag to set the file-name from the MP3 ID3 tag information embedded in the
song. [2]

So that's where I started, but I wanted to automate the process at least a
little more. I recently installed OS X Leopard, which has a feature called Smart
Folders. These are folders whose contents are determined by a search string. You
can make a smart folder by simply searching in any Finder window, then clicking
the Save button in the top-right corner. To make the search we need, do the
following:

   1. Type Cmd+N to open a new Finder window.
   2. Type Cmd+F to start a search.
   3. Type "opr" and select to search "yourname" instead of "This Mac" and "File
      Name" instead of "Contents".

At this point, you won't see the files I'm talking about because the Spotlight
feature in OS X Leopard no longer automatically searches your ~/Library (as OS X
Tiger did). Despite the storm of complaints about this online, this is a good
thing. The search feature is much faster -- especially on older hardware, like
mine -- and searching the ~/Library is still possible. Here's how:

   1. From the search window you started above, press the little "+" button next
      to the "Save" button on the right side of the window.
   2. From the first drop-down, select "Other", then find the "System Files"
      entry in the list in the resulting pop-up window and press the "Ok"
      button. (hint: there's a search box in this window as well.)
   3. From the drop-down next to the one that now says "System Files", select
      "include"; now you should see many more files.
   4. Now, we can restrict further to show only the files that are big enough to
      be potential MP3 files. press the little "+" button again to add another
      search argument.
   5. If the "Size" option is not available from the first drop-down [3], select
      "Other" again and select it from the pop-up window (as above for "System
      Files").
   6. Set the "Size" option to "is greater than" "2" "MB"; that restricts the
      list significantly. See the image below for the final result
   7. Select "Save" from the top-right corner and give your search a name -- I
      cheekily named mine "Downloaded Music" -- and you can have the search show
      up in your sidebar as well.

[image]

Now, you can open a Finder window on this smart folder, sorting by date from
newest to oldest.  As you listen to music in Groove Shark or any other
Flash-based music service, you'll see the potential MP3 files magically appear
at the top of the window, from which you can then copy them to a safe place. [4]
With a fast connection, the song will be downloaded within the first several
seconds of the song; if you're collecting, you can already copy the file, then
go to the next one.

--------------------------------------------------------------------------------


[1] Without going into exacting detail, Windows applications generally store
    user data under C:\Documents and Settings\<username>\Application
    Data\<vendorname>\<applicationname> or C:\Documents and
    Settings\<username>\Local Settings\Application
    Data\<vendorname>\<applicationname>. Whereas the Opera cache is a single
    folder, the Safari cache is a vast tree of numbered folders within which
    it's difficult to locate anything reliably, though the search-based approach
    is likely to work there as well. Firefox's cache is also a single folder,
    IIRC.


[1] TriTag doesn't recognize files without the MP3 extension, so you have to add
    the extension to each file. If you've got a lot of them, the Finder asking
    you whether you're sure you want to add the extension gets a little old
    after the second time or so. To get around this hassle, use the Terminal and
    execute the following script from the command-line: for i in opr*; do mv $i
    $i.mp3; done. Now, you can drag them into TriTag and have it rename them.
    You can probably automate this further, but I drew the line there.


[1] For any of these options, you can set the "In Menu" check-box from the
    popup-window to make it available on the initial drop-down menu.


[1] Again, if you're interested in an assembly line feature where you just
    basically keep a copy of everything you've heard through your browser, you
    can automate further with Apple Scripts and/or the Automator application.
    Indeed, you could make a script that copied files from the cache to a
    separate folder, renaming them using the ID3-tag information as it did so.
    But that I leave as an exercise for the reader.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=2125</guid>
    <title><![CDATA[Improving Online Readability]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=2125</link>
    <pubDate>Sat, 07 Mar 2009 18:15:22 +0100</pubDate>
    <description><![CDATA[Published by marco on 7. Mar 2009 18:15:22
------------------------------------------------------------------------

If you spend any amount of time reading online, you know how difficult it
sometimes is to get the text into a format that makes for comfortable reading.
All the more so for those doing their reading on portable devices. Web sites
have several tools at their disposal to ease both online reading and printing:

  * Offer a printable stylesheet that is used when the browser prints the
    document, so that advertising, comments, and other garbage are left out,
    leaving only the text of the article.
  * Offer a "print" view, which takes the user to another page from which the
    aforementioned garbage has been removed.
  * Offer a "single page" view, which shows the entire content of the article on
    a single, scrolling page rather than broken up into mini-pages. [1]

Though many sites offer one or more of these fine, paper- and eye-saving tools,
many do not. To the rescue ride the following two tools:

   1. "PrintWhatYouLike" <http://printwhatyoulike.com> lets you enter a URL and
      then slice and dice that page to your heart's content. Tools include
      "isolate", which removes everything but the selected content and "fit to
      width", which removes width-restrictions from the selected content.
   2. "Readability" <http://lab.arc90.com/experiments/readability/> is a
      Javascript bookmarklet that you can easily add to any browser. From the
      site, you can configure some basic settings like style, font-size and
      margin-sizes before you create the bookmarklet. Armed with this button in
      your browser, you can browse to the page you'd like to print, then press
      it to transform that page into a marvel of readability (pardon the pun).

As an example, here's a simply atrociously formatted page from the New Scientist
[2]; as you can see, the left margin is non-existent and half the page is
consumed by advertising and headers that are distracting for online reading and
waste paper when printed.

[image]

The screenshot below is of the page above in the PrintWhatYouLike interface
after a few clicks have isolated the content, widened it and removed some
unwanted text. With the "remove" button, you can also easily zap advertising
that is embedded in the text of the article itself. It's actually kind of fun to
re-shape the page to your liking.

[image]

The screenshot below is of the page above after having pressed the magic
Readability bookmarklet. Without any user input other than your having set your
initial preferences for style, font-size and margins when creating the bookmark,
Readability automatically creates this wonderfully legible version of the page
that is eminently easy on the eyes.

[image]

I've found that I use both tools; I generally try Readability for online
reading, but use PrintWhatYouLike for a smaller font when printing. Readability
doesn't always work, though it often does a good-enough job; you may have
noticed that the author's name was dropped in the example above, though that
hardly seems important for reading. A simple refresh of the page restores it to
the original version. Readability works with a single button-click, which is
great but not fun; PrintWhatYouLike requires much more interaction, but is kind
of fun. Both tools belong in your arsenal against unfriendly formatting online.

--------------------------------------------------------------------------------


[1] Sites ostensibly break up single pages into multiple pages in order to
    increase ad-impressions.


[1] The article itself, as with so many others on that site, was well worth
    reading. Their formatting has gotten better, but it's historically awful:
    they used to have a 7pt default font.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=1889</guid>
    <title><![CDATA[How to send mail using earthli]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=1889</link>
    <pubDate>Sat, 02 Aug 2008 17:26:44 +0200</pubDate>
    <description><![CDATA[Published by marco on 2. Aug 2008 17:26:44
------------------------------------------------------------------------

If you have an email account, you can most likely check mail from anywhere in
the world -- either using webmail or by using a mail program using either POP
[1] or IMAP [2]. In order to check mail, you must always identify yourself and
authenticate with a password. Sending mail, on the other hand, used to be
easier; some hosts used to relay mail from any address to any address. In the
age of spam, this is no longer possible and many large ISPs have switched their
SMTP [3] settings to require authentication in order to use their servers. [4]

Setting up authenticated SMTP is in no way an out-of-the-box experience when you
use Linux Debian Etch for your server, so earthli.com had to wait quite some
time for that feature. It's finally here and working as expected and you'll find
instructions below for setting up the Apple Mail software to send mail via
earthli.com.

   1. Choose Preferences... from the Mail menu. [image]
   2. From the Preferences window, choose the Accounts tab at the top; select
      the earthli account on the left, then select the dropdown for Outgoing
      Mail Server (SMTP) and either choose to Add Server... or choose the
      existing entry for "earthli.com" and press Server Settings... to open the
      SMTP Settings window.[image]
   3. From the SMTP Settings window, fill out the details as shown below,
      leaving the Server port at "25" and making sure to Use Secure Sockets
      Layer (SSL) and using "Password" for Authentication; you will, of course,
      fill in your own name and password. [image]
   4. Select "Ok" to save and close the SMTP settings, then select the General
      tab to force the settings to be saved.

You can now send email from anywhere using your name and password. [5] If you
have trouble, use the Connection Doctor (under the Window menu in Apple Mail) to
test whether or not the connection appears to be working or not.

--------------------------------------------------------------------------------


[1] When you use POP -- Post Office Protocol -- to download mail, it is removed
    from the server and saved only on the client to which you downloaded it. You
    should avoid this protocol if possible -- preferring IMAP instead -- or, at
    the very most, use it from your "main" computer only, to avoid losing mail.


[1] When you use IMAP -- Internet Message Access Protocol -- to access mail, it
    remains on the server, but is marked as "read". A mail program downloads
    copies of messages to speed local access, but does not automatically remove
    anything on the server. The user, of course, is free to move messages around
    and delete them on the server.


[1] SMTP -- Simple Mail Transfer Protocol -- is the language servers speak with
    one another in order to deliver mail.


[1] This just happened to me recently; see "CableCom Now Requires Authentication
    for SMTP Relay" by Marco
    <https://www.earthli.com/news/view_article.php?id=1600> for more
    information.


[1] It almost goes without saying that you should only set up your own devices
    to use these settings as any mail delivered this way goes out in your
    account's name.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=1820</guid>
    <title><![CDATA[Optimizing XWiki]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=1820</link>
    <pubDate>Tue, 22 Apr 2008 18:42:13 +0200</pubDate>
    <description><![CDATA[Published by marco on 22. Apr 2008 18:42:13
------------------------------------------------------------------------

This article was originally published on the "Encodo Blogs"
<http://encodo.com/view_entry.php?id=124>. Browse on over to see more!

--------------------------------------------------------------------------------


Once you've got an XWiki up and running (whether you "imported a Mediawiki"
<http://encodo.com/en/view_article.php?id=73> or not), you'll find you want to
tweak the standard rollout a bit.

[Speeding up XWiki]

After working a while with XWiki, you may notice it getting slower. Our XWiki
was kind of slow from the get-go and we pretty quickly figured out why: the
slowdown was caused almost entirely by the pretty, DHTML list of all pages in
the panel on the right side. It apparently takes quite some time to build this
list (and ours included hundreds of pages from the import); it will have to go.

We edited the side-panel to replace the culprit Panels.SpaceDocs with
Panels.Spaces. This still gives us the ability to navigate directly to a spaces
WebHome, but doesn't waste time building up enormous lists of pages that we
almost never used. [1] Navigate to your Main-Page and enjoy your lightning fast
XWiki.

[1] Another solution would be to build a custom panel that uses AJAX to retrieve
    the list of pages (paginated, of course) for the space you selected. It
    could even have a drop-down to search/limit the pages that are shown.
    Unfortunately, this panel doesn't exist yet and we didn't have time to build
    it.

[Changing the default editor]

Since the WYSIWYG editor trashed some of our converted pages (we never
investigated why exactly) we switched the default editor to the XWiki editor.

This can be done for all users by setting the default editor on the
Administration/Preferences/Editing page. Each user can override this behaviour
on their own user page.

[Changes to the default skin]

Although the newest XWiki seems have a skin other than Albatross as a default,
we updated the current skin to fix up the following things that annoyed us:

  * The default heading sizes are simply enormous 
  * The comments/attachments boxes are way too bulky, showing up as huge blue
    splotches at the bottom of every page.
  * The default formatting for <pre> and <code> blocks takes up way too much
    space
  * Tables have enormous margins and are bright blue
  * Table-of-contents entries (displayed with the #toc macro) show up with
    bullets -- even when they're numbered.
  * The print-preview page has a thick, black border around it and it always
    prints the XWiki logo rather than the logo from the skin
  * The "page not found" marker is over-the-top and distracting
  * Definition lists have only default HTML formatting, which gives the
    definition block way too much left margin

Our fixes for these things are shown below. "YMMV"
<http://www.answers.com/ymmv?cat=technology&nafid=3>.

[Setting Defaults]

The first step is to "create a custom skin"
<http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Skins> (as described under
"changing the logo for the Albatross skin"). Once you've done that, from the
same form that you set the logo property, you can set your own style (it should
be the second property in the form).

You can type any valid CSS into this box and it will be included in all of your
XWiki pages. In fact, if this property is non-empty, it is the only skin-CSS
included by XWiki. It sounds ominous; what does it mean? It means that you must
copy the entire Albatross skin-CSS to your custom skin in order to at least
start off with the base look-and-feel. The best way to do this is with the
following standard CSS import [2]:

@import "http://yourwiki/xwiki/skins/albatross/style.css";

After this import statement, feel free to include any of the CSS snippets below.

[Fixing Headings]

Each heading has its own CSS-class associated with it. You have to set each and
every one and our settings are shown below. We used values that matched our CI,
more or less.

.heading-1 {
  font-size:14pt;
  margin:12pt 0pt 3pt;
  padding:0pt;
  line-height:1.5em;
}
.heading-1-1 {
  font-size:12pt;
  margin:12pt 0pt 3pt;
  padding:0pt;
  line-height:1.5em;
}
.heading-1-1-1 {
  font-size:12pt;
  margin:12pt 0pt 3pt;
  padding:0pt;
  line-height:1.5em;
  font-weight: bold;
}
.heading-1-1-1-1 {
  font-size:10pt;
  margin:12pt 0pt 3pt;
  padding:0pt;
  line-height:1.5em;
  font-weight: bold;
}
.heading-1-1-1-1-1 {
  font-size:10pt;
  margin:12pt 0pt 3pt;
  padding:0pt;
  line-height:1.5em;
  font-weight: bold;
}

[Fixing Code and Preformatted Blocks ]

As with most of the other updates, this fix involves removing a lot of padding
and margins, as well as toning down the coloring. We use the "Consolas" font by
default because we all have Office 2007 installed (you'll want other defaults,
like "Monaco" if you're using OS X). Code blocks still have a light-grey
background color, whereas pure preformatted blocks no longer have any color or
border at all.

.code {
background-color:#EEEEEE;
border:1px dotted #336699;
font-family:"Consolas",courier new,monospace;
font-size:9pt;
margin-bottom:4px;
margin-top:4px;
overflow:auto;
padding:5px;
white-space:pre;
width:85%;
}

.code pre {
padding: 0px;
margin: 0px;
border-width: 0px;
background-color: #EEEEEE;
}

pre {
background-color: white;
border: 0px;
padding:4px;
}

[Fixing the Table-of-Contents]

This is an easy one: simply remove the bullets.

.tocEntry {
list-style-type: none;
}

[Fixing Tables]

Tone down colors; remove margins and padding; make the hurting stop. Note the
use of the !important CSS directive to force the style to be used over another,
more-specific style defined in another stylesheet.

.wiki-table th, .wiki-table td {
padding: 2px;
}

.wiki-table th {
padding: 4px 2px;
font-size: 100%;
font-weight: bold;
background-color: #EEEEEE;
border-bottom: 1px dotted #336699;
}

.wiki-table {
margin: .5em 0em;
border: 1px dotted #336699 !important;
background-color: #EEEEEE;
}

[Fixing Definition Lists]

Make definition terms bold by default; fix up the margins for the definition
body. Definition lists are really useful in wikis, so it's important that they
look good.

dt {
  font-weight: bold;
}

dd {
  margin: .15em 1.5em .75em 1.5em;
}

[Fixing Comments/Attachments]

These areas benefit from the fixes for tables made above, but they still need a
bit more massaging before their color and margins are subdued enough -- they
are, after all, not the main elements on the page. The fixes involve setting the
remaining backgrounds/background-colors to none or transparent.

.xwikiintratitle {
font-size:100%;
font-style:normal;
font-weight:bold;
margin:0px;
padding:8px 0px;
}

#xwikidata #attachmentscontent, #xwikidata #attw, #xwikidata #commentscontent,
#xwikidata #commentscontent .xwikititlewrapper
{
  background: none;
}

#xwikidatacontents
{
  margin: 1em 0em;
}

[Fixing "Page-not-found" Links]

This fix removes the background color and turns the question mark brick-red,
which is much more subtle than the default.

.wikicreatelinkqm
{
  background: transparent;
  color: #CC0000;
  font-weight: bold;
}

[Fixing Print-Preview]

And, finally, printing: here we remove the print header entirely [3] and take
out the borders on the two main containers. The border change will affect the
non-printing view as well, but it has no visible affect.

#printheader
{
  display: none;
}

#xwikimaincontainerinner
{
  border: 0px;
}

#xwikimaincontainer
{
  border: 0px;
}

--------------------------------------------------------------------------------


[1] Another way to update the stylesheet is to put all of your styles into your
    own file on your XWiki server, then import that file instead.


[1] The logo is hard-coded and cannot be easily replaced, though you could
    probably do so by replacing some page, panel or code extension somewhere

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=1790</guid>
    <title><![CDATA[Windows XP Can't See a USB Hard Drive]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=1790</link>
    <pubDate>Sun, 06 Apr 2008 14:59:03 +0200</pubDate>
    <description><![CDATA[Published by marco on 6. Apr 2008 14:59:03
Updated by marco on 6. Apr 2008 15:04:02
------------------------------------------------------------------------

These days, all USB drives are plug-and-play with Windows XP: you plug it in,
Windows recognizes it and shows it in the Explorer, usually with a drive letter
like F, G or H. Sometimes, however, the auto-detection of the drive letter goes
awry and the drive doesn't show up in the Explorer and you're hard-pressed to
access it. [1]

If this has happened to you, you should first verify a few things:

  * Make sure that the drive is plugged in properly and that it is turned on
    (and/or drawing power somehow, either through its own power adaptor or
    through the USB connection).
  * Type Windows-Key+Break to show System Properties, then go to the Hardware
    tab and show the Device Manager. Is the drive visible there? If it is,
    you're in luck.

In order to fix the problem, you'll have to assign the drive a new letter. 

   1. From the Control Panel, select Administrative Tools, then select Computer
      Management. 
   2. In this window, select Disk Management under Storage. On the right, you
      should see all of the hard disks attached to your computer as well as
      their partitions.
   3. Select your USB drive from the list and right-click, selecting Change
      Drive Letter... from the popup menu.
   4. From the resulting dialog, select a letter that doesn't conflict with an
      existing drive letter (make sure to avoid any letters used by network
      shares) and press Ok.

Your drive should now appear in the Windows Explorer under the newly-assigned
letter.

--------------------------------------------------------------------------------


[1] This happened recently with a "FreeAgent(tm) Go"
    <http://www.seagate.com/www/en-us/products/portable/freeagent_go/> drive
    from Seagate, which failed to show up because Windows had assigned it the
    drive letter H, which was already mapped to a network share.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=1621</guid>
    <title><![CDATA[Poor Man's Backup with tar]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=1621</link>
    <pubDate>Sun, 22 Jul 2007 13:44:45 +0200</pubDate>
    <description><![CDATA[Published by marco on 22. Jul 2007 13:44:45
------------------------------------------------------------------------

The application tar is ubiquitous in the Unix/Linux world. It rolls multiple
files and directories into a single "tarball", which can be transferred more
easily and expanded at its destination. A single option, -z applies a
compression to the resulting tarball, giving the file the by now well-known
extension .tar.gz (for tar-balled and g-zipped). Extracting this file involves
two operations, in which first the compression is removed and then the tarball
unrolled.

The easiest way to back up a folder (like a home directory) is using the
following command:

tar -czf marco_backup.tar.gz /home/marco/

[Tarring "dotted" or hidden files]

However, this fails to include those most useful of files: the hidden files,
which begin with a dot (".") on Unix/Linux [1]. Adding a star to the command, as
shown below, fails to have any impact:

tar -czf marco_backup.tar.gz /home/marco/*

In order to pick up all files, hidden and visible, you have to use the dot (".")
from regular expression syntax, which tar interprets as
grab-everything-and-I-mean-everything-from-this-folder-and-any-folders-below-it.

tar -czf marco_backup.tar.gz /home/marco/.

Once the hidden files are in the tarball, they are extracted with all other
files when the archive is expanded to its destination -- without any special
syntax tricks. To expand an archive, navigate to its directory and execute the
following command:

tar -zxf marco_backup.tar.gz

[tar command line switches]

Here's a rundown of the most useful command line switches:

  * v -- Runs the command in verbose mode, showing the files and directories
    that it's zipping or unzipping. If you're tarring a big folder, it's best to
    leave this switch off.
  * c -- Indicates that tar should create a new archive.
  * x -- Indicates that tar should create a new archive.
  * z -- Applies compression to the tarball after it has been created.
  * f -- Indicates that the first argument is the name of the file to which it
    should store or from which it should extract the tarball/archive. This must
    be the last switch before the filename itself.

--------------------------------------------------------------------------------


[1] In particular, the Courier IMAP server stores its email in mailboxes, each
    of which begin with a dot. Running a backup with tar running in standard
    mode backs up almost no mails whatsoever.


]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=1528</guid>
    <title><![CDATA[Hidden Files in Perforce]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=1528</link>
    <pubDate>Wed, 24 Jan 2007 15:37:32 +0100</pubDate>
    <description><![CDATA[Published by marco on 24. Jan 2007 15:37:32
------------------------------------------------------------------------

This article was originally published on the "Encodo Blogs"
<http://blogs.encodo.ch/news/view_article.php?id=58>. Browse on over to see
more!

--------------------------------------------------------------------------------


We keep our source code in Perforce, an extremely powerful SCM (source control
manager). It retains multiple revisions of files and manages integrations
between "branches", or diverging streams of similar code. Read/write permissions
for paths within the depot can be restricted per user.

Recently, we needed to get the history of a particular file to see which changes
had been applied to it over the course of the last year. Instead of the
approximately 20 revisions we expected, we saw only one. The comment for the
revision indicated that the last operation on this file was that it had been
renamed to its current location.

[Renaming]

A rename in Perforce consists of two operations: the file is integrated from the
source location to the target location and then deleted from the source
location. That is, Perforce maintains the history of a file as multiple
resources in the depot whose histories are linked by integrations. The command
to retrieve file history accepts a flag, -i, which indicates that the server
should follow these previous branches, returning the history for those files as
well (as it is understood to be a single resource).

To continue with the example above, we expected to see the revisions for the
file at its previous location (before it was renamed) listed as part of our
file's history. [1] Perplexed, we tried to browse to the file location from
which it was branched, only to discover that we couldn't even get to the folder
for it, much less the file itself. In fact, the entire folder hierarchy right up
to the root had been deleted and was no longer available. In this case, Perforce
clients let you show deleted files, to ease restoring accidentally deleted
resources, but that didn't help either. Explicitly including the folder in the
workspace mapping yielded nothing.

[Obliterating]

We were stumped ... and starting to get worried that we had obliterated that
entire part of the depot instead of just deleting it.

By default, Perforce never forgets anything. Any change you make to a file in
the depot is recorded to a changelist and stored with the file's meta-data. This
includes, naturally, deleted files. If, however, files, or specific revisions,
are really no longer needed, Perforce can remove them -- along with their
metadata -- permanently. See the "obliterate documentation"
<http://perforce.com/perforce/doc.062/manuals/cmdref/obliterate.html#1040665>
for more information.

Before we started trying to figure out who to blame for the premature
obliteration, we checked the depot on the server itself -- only to discover that
all of the files were still there, exactly where we expected them to be. Using
the command line client and the maintenance user on the server, we created a
temporary workspace and synced an older revision (an undeleted one) of the file
to it. Opening the file revealed an intact source file. 

[Perforce Clients]

Next, we figured that the GUI clients might have a problem, though it was hard
to believe that it was a bug. To be sure, we used the command line client on the
original machine to get the file using the exact same commands as on the server
and, lo and behold, we saw:

"protected namespace - access denied."

Aha!

[Protecting depots]

As mentioned above, Perforce has a security system through which all data
requests are filtered. Users only receive information about files to which they
have "read" access. Imagine that the user has rights to
//depot/projects/sample/, but not //depot/old_projects/sample/, where the files
used to reside. 

Under these conditions, a command to retrieve file history with branches would
be processed as follows:

   1. The client makes a request for the file history, p4 filelog -i -L
      //depot/projects/sample/versions.txt
   2. The server processes the command, putting together the file list for the
      result, which includes listings from //depot/projects/sample/ and
      //depot/old_projects/sample/.
   3. The server filters the list according to what the user can see, returning
      only the entries from //depot/projects/sample/. [2]

This explains why the GUI showed only one revision in the file history, instead
of 20. It also explains why the original projects folder didn't appear in the
depot view in any GUI client. Only the command-line client indicated a
protection problem because a forbidden path was explicitly requested.

[Preventing Confusion]

Is there any way to improve the clients so that a user knows when content is
being denied? Is this even desired, from a security standpoint? When viewing the
depot tree, the user should not be made aware that there are entire folders
being blocked from view by protections -- that's a clear security breach. In
that case, the user has not made an explicit request for data that has been
blocked; the user has made a request for all available data, which implicitly
means all readable data.

When viewing the revisions for a particular file, the user has made an explicit
request for the file's history, including previous branches. If any of those
branches are blocked, the client has no indication that this happened because
the server filtered the list before returning it. In contrast to the other
situation, the user did explicitly request information from a forbidden path and
should be notified of it. However, the request returns a list of paths rather
than a single file (as was the case with the command-line client above). It
would not be appropriate to return only an error message if a particular branch
of a file's history has been blocked.

A more elegant solution would deliver the available history (as it does now),
but also an error message indicating that part of the result was blocked due to
protection restrictions (again, as shown above). This way, a user knows that the
protection mechanism blocked part of the information and can ask the
administrator if there is a configuration problem (as was the case with our
server).

For changelist requests, there is also no indication that part of the filelist
was blocked, leaving a user to wonder why there are files missing from a
changelist [3]. As with file history, the request for a changelist is explicit
and should indicate a partial error. On the other hand, if all files in a
changelist are blocked, the server should just return an error message (blocking
the description as well). If multiple lists are requested, the blocked
changelist should not appear at all.

[Conclusions]

With current versions of Perforce, users need to be aware that their rights are
potentially restricted and remember to check with their administrator before
assuming that information has been lost. Administrators need to be aware that
setting protections does not restrict users from seeing all changelist
descriptions, regardless of whether they are allowed to see files in that list
or not.

--------------------------------------------------------------------------------


[1] The P4Win client includes a Display branching history checkbox, but all the
    subsequently displayed revisions are folded into a flat list, wherein branch
    boundaries are recognizable only by a reversion of the revision number to
    one. Use the P4V client for a more comfortable view, in which each file
    location (or branch) in the history has its own tree node, which can be
    opened and closed individually.


[1] We also verified that this server-side filtering applies everywhere,
    including changelists. If a user requests a changelist in which all paths
    are blocked, the changelist appears empty.


[1] Granted, this applies only if the user is examining older changelists,
    submitted before protection permissions were changed. This can be confusing
    because the user may remember checking in a particular file, but doesn't see
    it now, which then looks like a bug in the server.

Using p4d/p4v/p4 2006.1 & p4win 2006.2

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=1245</guid>
    <title><![CDATA[Deleting Recent Connections in P4V (Perforce Client)]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=1245</link>
    <pubDate>Wed, 22 Feb 2006 09:44:18 +0100</pubDate>
    <description><![CDATA[Published by marco on 22. Feb 2006 09:44:18
------------------------------------------------------------------------

The Perforce P4V client has a list of recent connections under the "Connection"
menu. This is especially nice when you use more than one workspace or more than
one server. However, if you select the wrong workspace, it stores that copy too
and there doesn't seem to be any way of editing the list from the UI. That means
your recent connections list gets crowded with entries you don't want -- and
which may fail with a long timeout when selected.

You can't remove entries from this list through the UI, but you can remove them
directly from your Perforce settings:

   1. Quit P4V to make sure it has saved all recent settings.
   2. Browse to C:\Documents and Settings\<username>\.p4qt.
   3. There should be two files for each connection, a .ws file and a .ws.ui
      file. These files are numbered, but their order doesn't correspond to the
      order in the menu.
   4. Open the .ws file in a text editor (e.g. drag it to an open Notepad) to
      check to which workspace/server combination it corresponds.
   5. Delete the pair of files (.ws and .ws.ui) for the recent connections you
      no longer want. Though the files are numbered, you do not need to renumber
      them as Perforce simply reads all files in the directory.
   6. Re-open Perforce and verify that the connections are gone.

]]></description>
  </item>
  <item>
    <guid>https://www.earthli.com/news/view_article.php?id=1239</guid>
    <title><![CDATA[Sharing a Printer Between Windows Machines]]></title>
    <link>https://www.earthli.com/news/view_article.php?id=1239</link>
    <pubDate>Sat, 18 Feb 2006 21:54:15 +0100</pubDate>
    <description><![CDATA[Published by marco on 18. Feb 2006 21:54:15
Updated by marco on 12. Apr 2008 13:24:56
------------------------------------------------------------------------

[image]


[Sharing files]

It's no longer as rare as it used to be to have more than one computer in a
home. That means that home users are going to need to run networks -- which is
no mean feat for Windows machines. Getting two newly-installed [1] Windows
machines to see each other is relatively easy. 

   1. Just right-click a folder, select "Sharing" and tell it the folder is
      available. 
   2. Users on other computers will need to log in with a valid account for that
      machine in order to access the folder. If you have the same user
      name/password on both machines, Windows even logs in automatically [2].


[Enabling "Sharing"]

If "Sharing" is not available on the popup-menu when you right-click, you have
to install the "File and Printer Sharing for Microsoft Networks" Service first. 

   1. Go to "Control Panel" => "Network Connections" and select the adaptor for
      which you'd like to enable sharing. Most modern laptops have two adaptors,
      a "Wireless Network Connection" and a "Local Area Connection". 
   2. Right-click the adaptor over which you'd like to share and select
      "Properties".
   3. Click the "Install..." button.
   4. From the resulting dialog, click "Service" in the list at the top, then
      "Add...". 
   5. Select the "File and Printer Sharing for Microsoft Networks" network
      service and click "Ok".
   6. Let Windows do its thing -- it'll probably ask you to reboot -- and you've
      got sharing enabled.

[Sharing a Printer]

One resource that you also want to share is a printer. Most home printers can be
attached only to a machine, so only that computer has access to it. [3] Note
that the service for sharing files also supports sharing printers. That means
you can share a printer in the same way.

   1. Install the printer on one machine.
   2. Right-click the printer icon in "Control Panel" => "Printers and Faxes"
      and click "Sharing".
   3. Click "Ok" to share the printer.

The machine to which the printer is attached is now advertising that it has a
printer. How can the other machine use this printer?

   1. Go to "Control Panel" => "Printers and Faxes" on the other machine (the
      one without the printer).
   2. Right-click in the empty space and select "Add Printer".
   3. Select "A network printer, or a printer attached to another computer" and
      click "Next".
   4. Click "Next" to browse for a printer [4].
   5. Select the printer and click "Next" to install it (you may have to click
      "Ok" to accept the driver installation and you will have to log in with a
      valid account for the other machine to use it -- see above for more
      information).

[Logging in to the Printer]

Now you can print to the shared printer from any of the applications on the
second machine. Remember, during the printer installation, when you had to give
a user name and password to log in to the printer? Windows will forget this name
and password the next time you restart the machine sharing the printer. That is,
if you restart the machine without the printer and then open a document and try
to print it, Windows will refuse. It doesn't ask for the password or anything --
just gives you one of several reasons why it can't access the printer.

That means you need to log in to the printer somehow every time you start the
computer. This is best done by double-clicking the shared printer to force
Windows to ask for a password.

   1. On the machine with the shared printer, go to "Control Panel" => "Printers
      and Faxes".
   2. Drag the printer to the desktop, holding down "Control" and "Shift" on the
      keyboard. Let go over the desktop and it will create a shortcut to the
      printer.
   3. When you double-click the printer there, it will ask to log in if you
      haven't already. You only need to do this once per Windows reboot, but you
      can't print until you do.

--------------------------------------------------------------------------------


[1] Machines that are not newly-installed are likely to suffer from "Windows
    entropy", an affliction that causes them to fail in completely mysterious
    ways at what would seem common tasks.


[1] Sometimes.


[1] If your home network has a router to provide internet access, you may be
    able to plug the printer directly into the router to allow access from all
    machines. The printer must support this with its own network card --
    generally a feature only on higher-end laser printers.


[1] The Windows network browser is notoriously slow and unreliable (it also
    tends to freeze the whole rest of the system while it searches). If you know
    the name of the printer (which you should ... it's on the other machine),
    just type it in and click "Next" to use that.

]]></description>
  </item>
  </channel>
</rss>
