background preloader

Why programmers work at night

Why programmers work at night
[This essay has been expanded into a book, you should read it, here] Image via Wikipedia A popular saying goes that Programmers are machines that turn caffeine into code. And sure enough, ask a random programmer when they do their best work and there’s a high chance they will admit to a lot of late nights. Some earlier, some later. At the gist of all this is avoiding distractions. I think it boils down to three things: the maker’s schedule, the sleepy brain and bright computer screens. The maker’s schedule Paul Graham wrote about the maker’s schedule in 2009 – basically that there are two types of schedules in this world (primarily?). On the other hand you have something PG calls the maker’s schedule – a schedule for those of us who produce stuff. This is why programmers are so annoyed when you distract them. Because of this huge mental investment, we simply can’t start working until we can expect a couple of hours without being distracted. The sleepy brain Bright computer screens Fin Fin

How to Prevent Image Bandwidth Theft With .htaccess Protect your images from being linked by other websites while you pay the bandwidth! by Christopher Heng, thesitewizard.com If your website displays beautiful pictures, you may encounter the ugly situation where your photos and other images are used without your permission on other sites. Even worse, those websites "hotlink" your pictures, that is, they don't host the pictures directly on their site, but embed them into their pages by linking to the copy on your site. System Requirements The solution outlined in this article requires your site to be hosted on a machine using the Apache web server. If this is not the case for your website, you cannot use the suggestions given here. (To find out if your web server fulfills the requirements stated here, try checking up the documentation on your web host's website — the information is usually available on their list of web hosting packages, price lists or on their order form. Steps to Take That's all there is to it. Potential Problems

Git: Your New Best Friend [Server Side Essentials] Introduction This article introduces version control and Git without assuming you have any prior knowledge or programming experience. Because of its introductory nature, certain details are simplified or omitted and the use of the Git Graphical User Interface (Git GUI) is emphasized. Afterwards the reader should be able to use Git for basic version control and know where to locate further information. Version control is the process of recording the history of changes to files as they are modified. protect against changes – accidental or otherwise – and be able to access a known good version of a filetrack down problems and make fixes to previous versions of filesallow more than one person to modify project files simultaneously (programmers refer to this as parallel development)retrieve an older set of files (if requested by a customer or manager, for example) Git runs on Windows, Mac OS X, Linux and UNIX. Concepts Installing Git Starting to Use Git $ git init The Git Index Configuration <! ...

Word HTML Cleaner A tool to strip Microsoft’s proprietary tags and other superfluous noise from Word-generated HTML documents, leaving all the basic goodness intact. File sizes are greatly reduced, and the returned markup is easier to read, revise and employ. This is intended for fairly basic styled text documents: please don’t upload your 50,000-word richly illustrated annual report and expect a nice slim web page in return. If however you’re used to writing in Word and you regularly find it awkward to get your text ready to publish online, this is the tool for you. Typographer’s quotes and dashes, and other non-ascii characters, are converted to HTML entities to increase their portability amongst browsers and operating systems. HOW TO USE : Save a Word document ‘as Web Page…’ to your hard drive (this will not work with ordinary Word files, e.g., filename.doc).

guava-libraries - Guava: Google Core Libraries for Java 1.5+ Home Chapter 4. Resources Java's standard java.net.URL class and standard handlers for various URL prefixes unfortunately are not quite adequate enough for all access to low-level resources. For example, there is no standardized URL implementation that may be used to access a resource that needs to be obtained from the classpath, or relative to a ServletContext. While it is possible to register new handlers for specialized URL prefixes (similar to existing handlers for prefixes such as http:), this is generally quite complicated, and the URL interface still lacks some desirable functionality, such as a method to check for the existence of the resource being pointed to. 4.2. Spring's Resource interface is meant to be a more capable interface for abstracting access to low-level resources. public interface InputStreamSource { InputStream getInputStream() throws IOException; } Some of the most important methods from the Resource interface are: 4.3. 4.3.3. This is a Resource implementation for java.io.File handles.

50 Powerful Time-Savers For Web Designers - Smashing Magazine Being a web designer is not easy. Not only do we need to have a good understanding about visual design, typography, information architecture, psychology and a plethora of other disciplines; in our work, we need to take care of so many details, so that our job becomes more and more time-consuming, requiring dozens of tools, attention span and an effective workflow for beautiful, timely and functional results. And this is where small time-savers become handy. You may want to subcribe to Smashing Magazine’s E-Mail Newsletter1 (32,600 subscribers) to keep updated about new useful tools, techniques and resources. Time-Savers For Web Designers Link LaunchList2This tool helps you review important items before the big launch. Pencil Project: Sketching and Prototyping with Firefox6Pencil is an open source GUI prototyping tool. Zootool8Zootool is a bookmarking website and tool for collecting images, documents, links and videos from anywhere on the Web. try ruby! Further useful tools Link

Welcome to WhatsRunning.net! The home of What's Running, your system information utility! Sandboxie - Sandbox software for application isolation and secure Web browsing plusone-button Documentation You can add and customize the +1 button to meet the needs of your website, such as modifying the button size and load technique. By adding the +1 button to your website, you allow your users to recommend your content to their circles and drive traffic to your site. Use of the +1 button is subject to the Google+ Platform Buttons policy. Getting Started A Simple Button The easiest method for including a +1 button on your page is to include the necessary JavaScript resource and to add a +1 button tag: The script must be loaded from the HTTPS protocol and can be included from any point on the page without restriction. +1 tag To render a simple +1 tag: You can also use a HTML5-valid +1 tag by setting the class attribute to g-plusone, and prefixing any button attributes with data-. By default, the included script will traverse the DOM and render +1 tags as buttons. Asynchronous JavaScript loading For improved page load time, you should load the JavaScript asynchronously. Configuration

How to Sniff Passwords Using USB Drive As we all know, Windows stores most of the passwords which are used on a daily basis, including instant messenger passwords such as MSN, Yahoo, AOL, Windows messenger etc. Along with these, Windows also stores passwords of Outlook Express, SMTP, POP, FTP accounts and auto-complete passwords of many browsers like IE and Firefox. There exists many tools for recovering these passswords from their stored places. Using these tools and a USB pen-drive, you can create your own rootkit to sniff passwords from any computer. MessenPass: Recovers the passwords of most popular Instant Messenger programs: MSN Messenger, Windows Messenger, Yahoo Messenger, ICQ Lite 4.x/2003, AOL Instant Messenger provided with Netscape 7, Trillian, Miranda, and GAIM. Mail PassView can also recover the passwords of Web-based email accounts (HotMail, Yahoo! IE Passview: IE PassView is a small utility that reveals the passwords stored by Internet Explorer browser. Insert the pen-drive and the auto-run window will pop-up.

Check your PHP code at every level with unit tests It's 3 a.m. Do you know if your code is still working? Web applications run 24x7, and wondering whether my application is still running has kept me up at night. Unit testing has helped me gain significant confidence in my code -- and get a good night's sleep. Unit tests are a framework for writing tests on code and running those tests automatically. PHP unit tests For PHP, the unit test framework is PHPUnit2. After you've installed the framework, you can begin writing unit tests by creating test classes that derive from PHPUnit2_Framework_TestCase. Back to top Module unit tests I've found that the best place to begin unit testing is with the application's business logic modules. Listing 1. <? This TestAdd class has two methods in it, both with the prefix test. The PHPUnit2 system defines the assertTrue() method, which is used to test that the conditional held in the argument evaluates to true. Listing 2. When I run the unit tests now, both tests fail. Listing 3. Now I know both tests work.

Related: