不辜负自己,不将就生活。

Month: July 2016

Useful Development Tools – 2

This article continues my last blog.

Console Multiplexer

GNU screen – Effectively uses your console!

GNU screen is a magic. It allows you simply create multiple “tabs” inside a session, and switch between them without using a mouse (WHY bothering to use mouse if you can use your keyboard more efficiently?). This suits console well. Besides, the detach and restore helps remote users especially with link failure!

cmder

GNU screen is for Linux. If you are working on Windows, you should replace cmd with Cmder! It enhances the Windows console with a lot of features, and it has tabs and if configured properly, a closer experience to GNU screen. Besides, since cmder has git embedded (I mean cmder not cmder_mini), you have those basic Linux commands available, as well as Git.

SSH Client and Tool

PuTTY

Putty is my favorite SSH client and serial terminal (I mention it in serial terminal too as you will see). No installations, free, cross-platform, putty has all the features you need as a SSH client. Putty is a very good alternative to commercial software SecureCRT. But if you want SSH file transfer, see below.

FileZilla

Putty also provides file transfer with PSFTP, but I find it more convenient with some GUI clients like FileZilla. FileZilla support FTP as well as SFTP, and it is cross-platform too.

Serial Terminal

PuTTY

Hey Putty again! The serial terminal provided with Putty will meet your needs most of the time, but it lacks hex support. If you want hex support, you should consider following tools.

CoolTerm and AccessPort

Both of the tools support displaying hex for received serial data, but CoolTerm seems not able to send hex string. If you want to send hex as well, use AccessPort. AccessPort has not been updated for a some time, but per my test, it works well with even Windows 10. AccessPort only works on Windows, while CoolTerm is cross-platform, supporting Windows, Mac and Linux.

Packet Sniffer

Wireshark – Powerful Sniffer for Ethernet, ZigBee, etc.

Wireshark is cross-platform and on Linux, it enhances tcpdump with clear UI (Wireshark can open tcpdump files). Wireshark supports ethernet sniffering well, features powerful filtering, and lots of protocol decoding built in.

With a compatible ZigBee dongle, Wireshark also supports ZigBee packet sniffer to ZCL level. Actually, any 802.15.4 packets, thus even 6LowPan, or any protocols built upon that, like Thread, should be supoorted by Wireshark as well. With an active community behind, Wireshark is continuouslly being add more protocols to expand parsing capability. Think about Ubiqua, the commercial ZigBee protocol analyzer software, it costs $999 per license!

Case Sensitive Files in Git Windows

There are cases which cannot happen with Linux, but could happen when you use Git in windows:

e.g.

In remote Git repo contains 2 files:

Log.c and log.c

When you clone the repo using Git windows, you will only have log.c in your working copy, but when you issue git status,

it will always tell you a modified, unstaged, Log.c

So it is a BAD PRACTICE to have 2 files with the same(only case-different) name. This is NOT cross platform.

To delete either one from the remote repo, you can use a Linux machine, or, use following steps on Windows: (In this example, rm Log.c)

Steps

  1. git mv Log.c CASESENSITIVE.c
  2. git commit -m “xxx”
  3. git reset –hard HEAD
  4. git rm CASESENSITIVE.c
  5. git commit -m “xxx”

Useful Development Tools – 1

Open source has changed a lot of things, notably, abundant tools that are of quality, usability and activeness. Here I will list a number of them which change my life doing development.

Editor

Vim – the ultimate editor

I have tried many editors, which includes, sublime text, ultraedit, notepad++, and those heavy ones like Eclipse, Visual Studio, etc., and I have to admit that the one fits me best is the vim, of course, vim with suitable plugins.

Vim is availble in all platforms including Linux, Windows, with both x86 and x64 versions, thus I can always have the same experience, the hotkeys, and without the mouse.

Eric S. Raymond in his book “The Art of UNIX Programming”, however, insists that emacs be better. Everyone is free to choose, but I believe the word that Andrew Hunt and David Thomas once said in their book “The Pragmatic Programmer”:

Use a Single Editor Well

Diff Tool

Meld – A decent choice

I have tried Beyond Compare, which I think is the best in the field, yes the best. WinMerge, P4Merge, tortoise Diff, vimdiff, they are good but for some reasons I do not like them. But Beyond Compare is not free or open source, and meld, in my point of view, works as a decent alternative to Beyond Compare. I like its visual interface, and its easy integration with SCM like git.

Besides, meld is also cross-platform, which I will always have it, no matter which platform I am working on.

SCM

Git – Believe Linus

When I started development, I used CVS to track my codes, then Subversion, which is way better than that. But it was until Git that I thought a modern version control had come. Thanks to Linus Torvalds, the creator of Linux, contributed to the community the simple yet powerful toolsets. Every developer should start using Git in their daily work, even without a remote repository.

Git also enables never-so-easy collaboration between developers. The pull request, branch, rebase, merge, all act as interesting but socialized things, much much better than the days developers sending patches.

Use it!

© 2025 A Life Climber

Theme by Anders NorenUp ↑

error: Content is protected !!