Saturday, August 30, 2014

Essential free windows software

Here's a quick checklist of the free software I usually install on new Windows machines ...

Browser: Firefox - still the best browser in my opinion, with a wealth of developer tools. Chrome is also good but I found it to be prone to crashing, so gave up on it. After installing Firefox, I remove the Internet Explorer link on the task bar.

Email: Thunderbird - runs a bit slow sometimes, but the Thunderbird portable version is great to carry around on a USB thumbdrive. Check out these tips on how to speed up Thunderbird on Windows 7.

Anti-virus software: Microsoft Security Essentials. Nothing fancy but gets the job done.

DVCS (Distributed Version Control System): Git for Windows. Includes a command line shell which features decent help for all the git commands. You can use this to pull from and push to remote repositories hosted on services such as GitHub and BitBucket.

SVN client: Tortoise SVN client which integrates with Windows Explorer right click menus.

Flash: Adobe Flash Player. Be sure to uncheck the McAfee Anti-virus installer option. I really hate installing Adobe software onto a new PC. My only reason for doing it is for the many websites that still rely on flash.

File archive/compression tool: 7-Zip supports many formats, such as zip, rar, gz and tar, is fast, and open source.

Media player: VLC Media Player. This is a great music and video player which also can be used to rip DVDs and CDs. After installing it, I remove the Windows Media player link on the task bar.

Text editor: Notepad++. An excellent replacement for Notepad which supports syntax highliting for probably every known programming language, including Golang, via a simple language syntax file.

PDF creation: PDF Creator installs itself as a printer on your system, so when you print to it, it prompts you for the PDF filename to create.

PDF viewer: Sumatra PDF. This is an extremely fast PDF viewer, written in C++. It has a simple, uncluttered user interface. It also supports other formats such as XPS. Makes a nice change from the bloated incumbents, Adobe Reader and Foxit Reader. Refreshingly there's no adware or spyware in the installer and they also offer a portable version (no install required).

Office software (spreadsheet, word processor, slideshow): Libre Office and Open Office are free alternatives to the more widely used Microsoft Office, which still claims top spot in the number of businesses using it. Try and get the discounted MS Office Student Edition, or a discounted MS TechNet license to save money on the standard price. This site offers digital downloads of the various MS Office installers, however you will still need a valid license key to install it.

CD/DVD burner & ripper: ImgBurn

Bitmap graphics editor: either Paint.NET or GIMP. Both are excellent alternatives to the long established Adobe Photoshop.

Vector graphics editor: Inkscape is a fully featured alternative to Adobe Illustrator.

Diagram editor
: Dia is useful for creating things like flowcharts, network topology maps and block diagrams ... its an excellent free alternative to Visio.

Graphic file viewer: IrfanView is a compact and fast picture viewer for Windows. Its claim to fame is that it has been around forever (well at least since 1996) and is maintained by a humble dude from Bosnia called Irfan Skiljan (pronounced "Earfan") hence the name of the software. It has built in support for many file formats such as PCX, TIFF, RAW and other arcane formats such as those used on Amiga, Atari and Silicon Graphics machines. You can also use it to do batch format conversions.

Digital darkroom software: LightZone is a great free alternative to Adobe Lightroom. You'll just need to sign up for an account on their website before getting a download link.

3D graphics and animation: Blender is a free and open source 3D animation suite. It supports the entirety of the 3D pipeline - modeling, rigging, animation, simulation, rendering, compositing and motion tracking, even video editing and game creation.

3D modeling: SketchUp is an easy to use 3D modeling program. It has uses primarily in the fields of architecture, interior design, mechanical engineering and industrial design. Its free for personal and educational use. Their website has a large repository of 3D models that you can download.

Video editing: Blender mentioned above (under 3D graphics) can also do video editing, but for a standalone video editing program for Windows, one of the best available is Lightworks. The standard version is free, but they offer also paid pro version which has more advanced features. A decent alternative to Adobe Premiere. For only basic video editing, then the free Windows Movie Maker from Microsoft is a good option.

Password safe: KeePass. Comprehensive list of features, is open source, and is under active development.

File synchronisation: Dir Sync Pro. Useful for keeping local offline backups of entire directory structures or hard disks.

Binary hex editor & viewer: FRHED (FRee Hex EDitor) is a great little program. What's more there's no installer, just a simple .exe file you can put anywhere you want. Great for viewing, editing and searching through binary files.

Task manager: Process Explorer by Windows guru Mark Russinovich is like the Windows Task Manager on steroids. You can find out which files and DLLs a particular process is using.

C# REPL: CShell is an interactive C# interpreter, also known as a REPL (Read-Evaluate-Print-Loop). Such tools are par for the course for scripting languages like Ruby (irb). CShell lets you try snippets of C# code or call a DLL in a couple of lines, without having to fire up a heavyweight tool like Visual Studio.

Follow @dodgy_coder

Subscribe to posts via RSS


Friday, August 22, 2014

How to setup the Gigabyte Brix (GB-BXBT-2807) Ultra Compact PC

A step by step guide, including:
  • Gigabyte Brix hardware setup.
  • Preparing the Windows 7 installer USB boot drive.
  • Installing Windows 7 (64 bit).
  • Installing the Gigabyte Brix drivers.


BRIX PRODUCT DETAILS


GB-BXBT-2807 (rev. 1.0)
Intel® Celeron Processor N2807 (2 core) running at up to 2.17 GHz
http://www.gigabyte.com/products/product-page.aspx?pid=5038#ov


Officially supported operating systems:
  • Windows 7 (64 bit)
  • Windows 8 (32/64 bit)
  • Windows 8.1 (32/64 bit)

PARTS LIST

  • 1 x Gigabyte Brix - GB-BXBT-2807, AUD $165. Purchased here.
  • 1 x 2.5" SSD Intel 520 series, 120GB, AUD $79. Purchased here.
  • 1 x 4GB memory - SO-DIMM DDR3 1.35V 1600MHz (GEIL) green series, AUD $59. Purchased here.
  • 1 x Windows 7 (64 bit) DVD (or ISO file).
Total price of hardware: AUD $303

Purchased from : PLE Computers, Bentley, WA, Australia.


EQUIPMENT REQUIRED TO SETUP

  • 1 x USB hard drive with at least 4GB free (I used an old USB 2.0, powered, 250GB 3.5" Western Digital hard drive), but you can just as easily use a small USB flash drive or a portable 2.5" USB drive.
  • 1 x small Philips head screwdriver.
  • 1 x desktop PC or laptop running Windows; for setting up the Windows 7 USB boot drive and copying some Brix driver files.
  • 1 x monitor, either HDMI or VGA.
  • 1 x wired USB Keyboard.
  • 1 x wired USB Mouse.

STEP (1) BRIX HARDWARE SETUP


  1. Take off the bottom panel by unscrewing the 4 black screws.
  2. Inside the unit, remove the tape holding down the SATA cable.
  3. Install the low power (1.3V) RAM into the single slot - need to insert it at an angle fist, then push it downwards until it clicks into place.
  4. From the bottom panel, remove the 2.5" HD cage (mine had two screws, but its meant to have 4) and install the 2.5" SSD into the cage. Connect the SATA cable to the hard disk. There's only one way it can be inserted, so you can't make a mistake. Screw the cage back onto the bottom panel. Replace the bottom panel onto the Brix.
  5. Connect the power supply to the DC-in port.
  6. Connect a monitor to either the HDMI or VGA port.
  7. Connect a wired USB keyboard to the USB 2.0 port.
  8. Turn on the Brix via the power button on the top.
  9. Keep pressing the Delete (DEL) key on the keyboard about twice per second until the BIOS screen appears. Use Left/Right arrows to navigate between tabs.
  10. Confirm that the RAM and SSD have been detected by the BIOS.
  11. Change the operating system option to Windows 7. Note that the Brix requires the Windows 7 64-bit installer.
  12. Save and exit the BIOS.
  13. Switch off the Brix via the power button on the top.

STEP (2) PREPARING THE USB BOOT DRIVE FOR THE WINDOWS 7 INSTALLER


The following steps to be performed on a windows PC or Laptop...
  1. Ensure you have a Windows 7 (64 bit) install disk ISO file. If you have only the DVD, as I did, you will need to rip it to an ISO file at this point, using the ImgBurn software for example. Leave the ISO filename the same as the disk label (default behaviour). N.B. ImgBurn has a notoriously sneaky installer that will install "conduit" search malware and other crapware if you don't read the installer options properly, and deselect all options apart from the first one, which is ImgBurn itself.
  2. Download and run Rufus - a utility to help you create a USB boot drive from an ISO. Rufus is a standalone .exe file, no install is needed, which is awesome.
  3. Connect to the laptop a USB drive with at least 4GB free space that will be formatted (erased).
  4. If no drives appear at this point, its because Rufus defaults to only displaying USB flash drives. Press Alt-F to have it display all fixed USB drives.
  5. In Rufus, select the target USB drive and also the source Windows 7 ISO file.
  6. Select the option "create MBR for BIOS and UEFI computers" and also the NTFS file system. These should be the defaults after selecting the Windows 7 ISO.
  7. Create the USB boot disk in Rufus. Leave the disk label the same as the original ISO (or DVD).
  8. After Rufus has finished, disconnect the USB boot drive.

STEP (3) INSTALLING WINDOWS 7 FROM THE USB BOOT DRIVE

  1. Connect the USB boot drive to a USB 2.0 port on the brix.
  2. Turn on the Brix via the power button on the top.
  3. Keep pressing the DEL key on the keyboard about twice a second until the BIOS screen appears.
  4. In the BIOS boot menu, confirm the USB boot drive is detected. If it is not detected, you may need to boot one more time by powering the brix off then on. I think this is something to do with the USB boot drive not being ready for the BIOS, which boots very quickly. In the BIOS boot menu, press the '+' key to move the USB boot drive to the top position.
  5. Save and exit the BIOS.
  6. Go through the Windows 7 setup. You can do this just fine with only a keyboard and no mouse, using TAB, SHIFT-TAB, UP, DOWN, LEFT, RIGHT and ENTER to make selections as required.
  7. After the Windows 7 installer has finished copying files and is starting the installation it will prompt you to restart the Brix. At this point, you should go into the BIOS and restore the boot setting to boot from the SSD first (not the USB boot drive). Alternatively, you can just turn off the USB boot drive at this point, before the restart occurs.
  8. Connect a wired USB mouse to the USB 2.0 port vacated by the USB boot drive.

STEP (4) INSTALLING THE BRIX DRIVERS IN WINDOWS 7


After Windows has been installed and booted ok on the Brix, install the following drivers from the driver CD by copying everything on it to a USB thumbdrive on your laptop and then inserting into the blue USB 3.0 port on the side of the Brix.

On the Brix, in Windows:
  • WiFi+BT driver - just double click setup.exe to install. This gets WiFi and Bluetooth up and running - you can then connect to the Internet. Requires a reboot after install.
  • Graphics - just double click setup.exe to install. Requires a reboot after install.
  • USB3 - just double click setup.exe to install. Requires a reboot after install.
  • Audio - just double click setup.exe to install. Requires a reboot after install.
I didn't bother installing the other drivers as they either weren't required by me (e.g. LAN) or they seemed to be only for Windows 8 anyway.

My boot time is 17 seconds from power on to the Windows 7 login screen. Not too bad, helped no doubt primarily by the SSD.


STEP (5) (OPTIONAL) CONNECT A WIRELESS KEYBOARD & MOUSE

  • In Windows, replace the wired USB mouse with a wireless USB mouse and wait for Windows to install the driver (takes a minute or two).
  • Replace the wired USB keyboard with a wireless USB keyboard and wait for Windows to install the driver (takes a minute or two).
  • I noticed a couple of times that the wireless mouse wasn't working. I had to unplug and replug its USB dongle, and that fixed it.

STEP (6) (OPTIONAL) INSTALL SOME WINDOWS SOFTWARE


At this point I installed this software, which I personally find are essential in Windows, although you might have differing opinions on each category. All are free.
  • Browser: Run Internet Explorer to download and install Firefox. Then I remove the Internet Explorer links on the task bar and desktop.
  • Anti-virus: Microsoft Security Essentials. Nothing fancy but gets the job done.
  • Flash: Adobe Flash Player. Be sure to deselect the McAfee A/V installer option. I really hate installing Adobe software onto a new PC. My only reason for doing it is for the many websites that still rely on flash.
  • Media player: VLC Media Player. Then I remove the Windows Media player link on the task bar.
  • Editor: Notepad++. An excellent replacement for Notepad which supports probably every known programming language, including Golang.

Small snippet of trivia to finish with ... the Gigabyte Brix was named after Colin Brix, who is a marketing director at Gigabyte's Motherboard Business Unit.



Follow @dodgy_coder

Subscribe to posts via RSS

Saturday, August 31, 2013

Evil User Interface Design

Thanks to Harry Brignull from Dark Patterns for bringing up the interesting topic of evil user interfaces; UIs designed to trick you into spending more money, or buying a product you don't want. Here's the best example from their slidedeck - the Ryanair booking form. I've added some explanatory comments below each screenshot.

1. Ryanair home page.
Loads of sale fares for just £5, looks great ... lets buy a ticket ...


2. The booking form.
Looks straightforward so far, no issues yet.


3. Passenger details section.
Notice the default option for the insurance dropdown is "Please select a country of residence".
If you're not paying attention, you'll assume it is just an address question, and so you'll select your country of residence. In doing so, you are actually selecting to pay for travel insurance ... its designed to trick you into selecting it by mistake.


4. Travel insurance dropdown.
 If you don't want travel insurance, then you have to select the correct option, "No Travel Insurance",
which is listed between Latvia and Lithuania.


5. On error, the dropdown clears your selection.
If you make a mistake anywhere on the form, such as shown above, forgetting to select "Yes" or "No" for the priority boarding question, then when you try and submit it, the insurance dropdown will default back to its original option, which was "Please select a country of residence". They really want you to pay for travel insurance, and this is their last chance of getting an extra few percent of users to buy it.


Follow @dodgy_coder

Subscribe to posts via RSS

Saturday, June 22, 2013

Hyperlink vs Button in Android

After installing the Google Play Music app, the first screen allows you to choose which Google account to associate with it.

Seems straightforward enough; but have a look at the screen - what you would press?



Looks like there's a choice of two commands, either Add account or Not now. But there's another command there ... the email address is a clickable hyperlink, but there's no indication that it is - no underline or radically different font. The Add account button actually prompts you to type in a new email address, i.e. not the one listed. One of the most confusing UI designs I've seen lately.

As discussed in this StackExchange.UX post, there's no strict rule about it, but buttons usually perform a command and hyperlinks usually take you somewhere new.

To improve it, maybe there should be a "Use" button to the right of each email address.

Follow @dodgy_coder


Subscribe to posts via RSS

Wednesday, February 20, 2013

Google's fiber leeching caper

Back in 2000, Google only had data centers on the US west coast and were planning an expansion over to the east coast, to reduce latency to end users. At the time, Google was not hugely profitable like today, and were very conscious of costs. One of the biggest costs of the move was duplicating the data contained in their search indexes over onto the east coast. Google had just passed indexing 1 billion web pages, and had around 9 terabytes of data contained in their indexes. They calculated that even at the highest speed of 1 Gigabit per second, it would take 20 hours to transfer all the data, with a total cost of $250,000.

Larry and Sergey had a plan however, and it centered on exploiting a loophole in the common billing practice known as burstable billing, which is employed by most large bandwidth suppliers. The common practice is to take a bandwidth usage reading every 5 minutes for the whole month. At the end of the month, the top 5% of usage information is discarded, to eliminate spikes (bursts). They reasoned that if they transferred data for less than 5% of the entire month (e.g. for 30 hours), and didn't use the connection at all outside that time, they should be able to get some free bandwidth.

So for 2 nights a month, between 6pm and 6am pacific time, Google pumped the data from their west coast data center to their new east coast location. Outside of these 2 nights, the router was unplugged. At the end of the month the bill came out to be nothing.

They continued like this every month until the contract with their bandwidth supplier ended, and they were forced to negotiate a new one, which meant actually paying for their bandwidth. By this time, Google had started buying up strategically located stretches of fiber, paving the way for its own fiber network to support its increasing bandwidth needs.

Source:

In The Plex: How Google Thinks, Works, and Shapes Our Lives [Amazon]
By Steven Levy
Published: April 12, 2011
See pages 187-188, Steven Levy's interview with Urs Hölzle and Jim Reese.


Saturday, February 2, 2013

How to learn a new programming language

Here's some tips on learning a new programming language. They aren't listed in any specific order. Hopefully you'll gain from this at least one new tip that will help you to become proficient in the next language you learn.

  1. Build something you actually need right now. This could be either a tool you can use in your day job, or something useful you can make use of at home.

    Consider these example projects ...
    • Write a simple unit testing framework. Many new languages don't have any unit testing frameworks available when they are first introduced. This project will force you to use areas of the language like reflection and meta-programming. Once completed, it becomes useful straight away, for unit testing your future work in the language.
    • Implement a disk usage tool; it summarizes the disk usage of all directories on a disk and outputs to the console. It doesn't require overly complex algorithms but touches a lot of the basics: recursion, filesystems, command line parsing and output formatting.
    • Implement a backup/archive script which has command line switches to exclude certain file extensions. It should place the backup into a single .zip or .tar.gz file. The project will touch on the following: recursion, filesystems, command line parsing, compression libraries and regular expressions.
  2. Port an existing, well known program to the new language. Since you are porting it, you already have the application design work done. This frees up your mind to focus on the specifics of the new language. After you've finished you'll then have a good reference to which you can refer back to, when comparing the old with the new language.

  3. Find a decent book on the language and read through it all as fast as you can. The goal is not to memorize everything, but to soak up the ideas and idioms of the language. Then write some small but non-trivial project. When you get stuck, hopefully it'll trigger a memory of something from the book, and you can go back to refer to it.

    Many of the "in a Nutshell" and "Head First" series of books, both published by O'Reilly, are highly rated by readers - they are available for many popular languages (C, C++, C#, Java, Python, JavaScript, PHP).

  4. Mix action with equal parts learning (reading books/tutorials). Too much action without learning, and you get a lot of poor quality code. Too much learning without enough action, and you fail to absorb the material to a deep enough level.

  5. Study reference works on public repositories. Find a medium sized project on GitHub which is written 100% in the language. Read though the code and try to understand it. Look for projects written by the language designers or an acknowledged expert.

    As an example, with Go, the standard libraries for the language are written in Go and are open source, e.g. here is part of the strings package.  In addition, Brad Fitzpatrick and other members of the Go team have several projects on GitHub that you can read and learn from, e.g. here is a Go client for Memcache.

  6. Devote large, uninterrupted chunks of time, at least half a day, to learning the new language. Brief, half hour sessions over the course of the week aren’t really useful, because most of the time would be spent just getting back up to speed on what you previously studied.

  7. Learning a language shouldn’t just be a solitary endeavor. There are plenty of people who have made the same mistakes that you have, so asking for help is a great way to overcome problems when you get stuck. Some possible sources of help online: Language-specific IRC channels, StackOverflow, Twitter, Facebook groups, Quora, Google+, Google groups. You can also submit your finished code to these forums after you've completed a project; people more experienced with the language than you will often be able to identify areas which can be improved or simplified.

  8. Use an editor with syntax highlighting. Perennial favorites such as Vim and Emacs, plus newer editors such as Sublime Text, feature support for most if not all programming languages and are available for all major operating systems. Some languages are often associated with specific IDEs; these are a good idea when learning a new language. These are generally ...
    • Eclipse IDE for Java and Android development.
    • Xcode for Objective-C and iOS development (on Mac OSX only).
    • Visual Studio IDE for C#, C++, VB.NET, F# (on Windows only).
    All of the IDEs and editors listed above are either completely free or have an unlimited trial version available.

  9. Working on a real project with real customers and deadlines is a white hot crucible for learning a new programming language. If you really need to learn a language quickly, then consider taking on a new job which requires it. Once you've got the job, you'll have no other choice but to learn it quickly.
     
  10. Finally, a tip from The Pragmatic Programmer, Tip #8 "Invest Regularly in Your Knowledge Portfolio":
    "Learn at least one new language every year. Different languages solve the same problems in different ways. By learning several different approaches, you can help broaden your thinking and avoid getting stuck in a rut. Additionally, learning many languages is far easier now, thanks to the wealth of freely available software on the Internet." 

Tuesday, January 15, 2013

Big Ball of Mud Design Pattern


In "Big Ball of Mud", Brian Foote and Joseph Yoder propose that the default (and most common) software architecture in use is the "Big Ball of Mud" pattern and go on to discuss six additional patterns and activities that it gives rise to: "Throwaway Code", "Piecemeal Growth", "Keep it Working", "Shearing Layers", "Sweep it Under the Rug" and "Reconstruction".

Their original article is located here and can be downloaded in PDF form here: Big Ball of Mud by Brian Foote and Joseph Yoder [PDF download]

I have picked out what I think are the highlights of their article ...


Big Ball of Mud ... alias Shantytown or Spaghetti Code

Shantytowns are usually built from common, cheap materials with simple tools and using unskilled labor. The construction and maintenance of the shantytown is labor intensive, and there is little or no labor specialization - each builder must be a jack of all trades. There's no overall planning, or regulation of future growth.

Too many of our software systems are, architecturally, little more than shantytowns. Investment in tools and infrastructure is often inadequate and the tools that are used are primitive. Parts of the system grow unchecked, and the lack of architecture and planning allows problems in one part of the system to erode and pollute adjacent portions. Deadlines loom like monsoons, and architectural elegance seems unattainable.

The time and money to chase perfection are seldom available and there is a survival at all costs attitude, to do what it takes to get the software working and out the door on time. The biggest cost borne by the Big Ball of Mud development is the lack of a decent architecture.


Common features of Big Ball of Mud Code
  • Data structures are haphazardly constructed, or non-existent.
  • Everything talks to everything else.
  • Important state data is global.
  • State data is passed around though Byzantine back channels that circumvent the system's original structure.
  • Variable and function names are uninformative and misleading.
  • Functions use global variables extensively, as well as long lists of poorly defined parameters.
  • Functions themselves are lengthy and convoluted, and perform several unrelated tasks.
  • Code duplication.
  • The flow of control is hard to understand, and difficult to follow.
  • The programmer’s intent is next to impossible to discern.
  • The code is simply unreadable, and borders on indecipherable.
  • The code exhibits the unmistakable signs of patch after patch at the hands of multiple maintainers, each of whom barely understood the consequences of what he or she was doing.
  • Did we mention documentation? What documentation?

Working with Big Ball of Mud Code

Some software engineers come to regard life with the Big Ball of Mud as normal and become skilled at learning to navigate these quagmires, and guiding others through them. Over time, this symbiosis between architecture and skills can change the character of the organization itself, as swamp guides become more valuable than architects.

As per Conway's Law, architects depart in futility, while engineers who have mastered the muddy details of the system they have built, prevail. The code becomes a personal fiefdom, since the author care barely understand it anymore, and no one else can come close. Once simple repairs become all day affairs, as the code turns to mud.


Throwaway Code ... alias Quick Hack or Protoduction

While prototyping a system, you're normally unconcerned with how elegant or efficient your code is. You plan that you will only use it to prove a concept and once the prototype is done, the code will be thrown away and written properly. As the time nears to demonstrate the prototype, the temptation to load it with impressive but utterly inefficient realizations of the system’s expected eventual functionality can be hard to resist. Sometimes, this strategy can be a bit too successful. The client, rather than funding the next phase of the project, may slate the prototype itself for release.

This quick-and-dirty coding is often rationalized as being a stopgap measure. More often than not, the time is never found for this follow up work. The code languishes, while the product flourishes. It becomes a protoduction - a prototype that gets used in production.

Once it becomes evident that the throwaway code is going to be around for a while, you can turn your attention to improving its structure, either through an iterative process of Piecemeal Growth, or via a fresh draft, as discussed in the Reconstruction pattern below.


Piecemeal Growth ... alias Refactoring

Successful software attracts a wider audience, which can, in turn, place a broader range of requirements on it.

When designers are faced with a choice between building something elegant from the ground up, or undermining the architecture of the existing system to quickly address a problem, architecture usually loses.

In the software world, we deploy our most skilled, experienced people early in the lifecycle. Later on, maintenance is often relegated to junior staff, and resources can be scarce. The so-called maintenance phase is the part of the lifecycle in which the price of the fiction of master planning is really paid. It is maintenance programmers who are called upon to bear the burden of coping with the ever widening divergence between fixed designs and a continuously changing world.

Piecemeal growth can be undertaken in an opportunistic fashion, starting with the existing, living, breathing system, and working outward, a step at a time, in such a way as to not undermine the system’s viability. You enhance the program as you use it. Massive system-wide changes are avoided - instead, change is broken down into small, manageable chunks.


Keep It Working ... alias Continuous Integration

Businesses become critically dependent on their software and computing infrastructures. There may be times where taking a system down for a major overhaul can be justified, but usually, doing so is fraught with peril. Therefore, do what it takes to maintain the software and keep it going. Keep it working.

This approach can be used for both minor and major modifications. Large new subsystems might be constructed off to the side, perhaps by separate teams, and integrated with the running system in such a way as to minimize disruption.

A development build of each product can be performed at regular intervals, such as daily or even more often via an automated build tool. Another vital factor in ensuring a system's continued vitality is a commitment to continuous testing, which can be integrated into the automated build process.


Shearing Layers

Software never stands still. It is often called upon to bear the brunt of changing requirements, because, being as that it is made of bits, it can change.

Over time, the software's frameworks, abstract classes, and components come to embody what we've learned about the structure of the domains for which they are built. More enduring insights gravitate towards the primary structural elements of these systems and change rarely. Parts which find themselves in flux are spun out into the data, where users can interact with them. Software evolution becomes like a centrifuge stirred by change. The layers that result, over time, can come to a much truer accommodation with the forces that shaped them than any top-down planning could have devised.


Sweeping It Under The Rug

At first glance, a Big Ball of Mud can inspire terror and despair in the hearts of those who would try to tame it. The first step on the road to architectural integrity can be to identify the disordered parts of the system, and isolate them from the rest of it.

Overgrown, tangled, haphazard spaghetti code is hard to comprehend, repair, or extend, and tends to grow even worse if it is not somehow brought under control. If you can’t easily make a mess go away, at least cordon it off. This restricts the disorder to a fixed area, keeps it out of sight, and can set the stage for additional refactoring.


Reconstruction ... alias Total Rewrite

One reason to start again might be that the previous system was written by people who are long gone. Doing a rewrite provides new personnel with a way to reestablish contact between the architecture and the implementation. Sometimes the only way to understand a system it is to write it yourself. Doing a fresh draft is a way to overcome neglect. Issues are revisited. A fresh draft adds vigor. You draw back to leap. The quagmire vanishes. The swamp is drained.

When a system becomes a Big Ball of Mud, its relative incomprehensibility may hasten its demise, by making it difficult for it to adapt. It can persist, since it resists change, but cannot evolve, for the same reason. Instead, its inscrutability, even when it is to its short-term benefit, sows the seeds of its ultimate demise.


The above are highlights from the original article, which is located here ... Big Ball of Mud by Brian Foote and Joseph Yoder [PDF download]


Some further reading on Programmers.StackExchange ...

I've inherited 200K lines of spaghetti code — what now?
How to convince my boss that quality is a good thing to have in code?
How to keep a big and complex software product maintainable over the years?
Techniques to re-factor garbage and maintain sanity?
When is code “legacy”?
What is negative code?


Some related books ...

Working Effectively With Legacy Code ... by Michael Feathers [Amazon]
Refactoring: Improving the Design of Existing Code ... by M. Fowler, K. Beck, et al. [Amazon]
Design Patterns: Elements of Reusable Object-Oriented Software ... by the Gang of Four [Amazon]
Patterns of Enterprise Application Architecture ... by Martin Fowler [Amazon]
Domain Driven Design: Tackling Complexity in the Heart of Software ... by Eric Evans [Amazon]
Head First Design Patterns by E. Freeman, E. Freeman, et al. [Amazon]