Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Rules



  Python Patterns - An Optimization Anecdote

The other day, a friend asked me a seemingly simple question: what's the best way to convert a list of integers into a string, presuming that the integers are ASCII values. For instance, the list [97, 98, 99] should be converted to the string 'abc'. Let's assume we want to write a function to do this. The first version I came up with was totally straightforward: def f1(list): string = "" for item in list: string = string + chr(item) return string ...

   Python,Optimization,Anecdote,Loopup,ASCII     2011-12-18 10:52:49

  Put Your HTML in a Box

In the first article in this series, I walked through the basics of cascading style sheets (CSS) and showed how CSS can make your code easier to maintain. CSS allows you to keep your presentation rules separate from your content, and I showed you some of the benefits this separation provides. In this article, I’ll move forward with CSS and describe how to position elements on a page.The first step in understanding how to position elements is to understand the fundamental model of CSSâ€...

   HTML,Box,Div,Container,Format     2011-08-19 08:22:58

  The ugliest C feature:

<tgmath.h> is a header provided by the standard C library, introduced in C99 to allow easier porting of Fortran numerical software to C. Fortran, unlike C, provides “intrinsic functions”, which are a part of the language and behave more like operators. While ordinary (“external”) functions behave similarly to C functions with respect to types (the types of arguments and parameters must match and the restult type is fixed), intrinsic functions accept arguments of...

   C,,Fortran,Intrinsic functions,C99,Ugly     2011-12-26 08:33:27

  Inspiration vs. Imitation

Every now and then I get a really lovely email from an aspiring letterer that is about to publish a passion project of his or her own. They tell me my work was an inspiration and that they can’t wait to share their creation with the world. I feel all warm and fuzzy inside for a moment…until I click on their link and realize that much of what they intend to publish is nearly a direct tracing of my work. A lot of established illustrators and designers deal with the same ...

   Designer,Copy,Divisify,Classification,Judgement,History     2011-12-05 12:26:38

  8 Things To Love & Hate About Outsourcing Employees

What is the dirtiest word in business? Chances are that the word ‘outsourcing’ comes to mind. Many Americans despise it, many business owners shy away from it and many entrepreneurs depend on it. Regardless of what side of the issue you are on, it is important to know that it exists and will continue to exist. Why? Because there are a lot of things to love about outsourcing.As a business owner and tech entrepreneur who exists in a hyper-competitive market, I have used outsourcing to...

   Employee,Outsourcing,Merits,Disadvantage     2011-11-12 10:16:13

  Decision Trees in C#

Decision trees are simple predictive models which map input attributes to a target value using simple conditional rules. Trees are commonly used in problems whose solutions must be readily understandable or explainable by humans, such as in computer-aided diagnostics and credit analysis. Download source code Download sample applications Download the full Accord.NET Framework Introduction Decision Trees give a direct and intuitive way for obtaining the classification of a new instance f...

   C#,Decision tree     2012-03-23 10:00:56

  Optimization Tricks used by the Lockless Memory Allocator

With the releasing of the Lockless Memory Allocator under the GPL version 3.0 license, we can now discuss more of the optimization tricks used inside it. Many of these are things you wouldn't want to use in normal code. However, when speed is the ultimate goal, sometimes we need to break a few rules and use code that is a little sneaky.The SlabA slab is a well-known technique for allocating fixed size objects. For a given object size, a chunk of memory is divided up into smaller regions of that ...

   Optimization,Memory allocation     2011-11-16 08:02:16

  How I Program Stuff

I love programming. I can truly say that of all the things I enjoy, I enjoy programming the most. There's nothing quite like the feeling you get when you create something. Writing code is a lot like building your own little universe. When you build stuff, you're in complete control, and, no matter how hard you fight it, your code directly reflects yourself. If you write sloppy code, I can almost guarantee you'll be a sloppy person. If you haphazardly throw code around with any ca...

   Programming,Steps,Isolate,Eliminate     2012-01-17 11:39:51

  Dieter Rams' 10 principles of good web design

Dieter Rams is one of the most important designers of the 20th century but his famous 10 principles for good design focused on industrial design. Here Lisbon-based designer Nuno Loureiro applies them to web design “My heart belongs to the details. I actually always found them to be more important than the big picture. Nothing works without details. They are everything, the baseline of quality”  â€“ D...

   Web design,Principle,Innovation     2012-02-08 10:29:32

  The trap of the performance sweet spot

This post is about JavaScript performance but I would like to start it by telling a story that might seem unrelated to JS. Please bear with me if you don’t like C.A story of a C programmer writing JavaScriptMr. C. is a C programmer as you can probably guess from his name. Today he was asked by his boss to write a very simple function: given an array of numbered 2d points calculate vector sum of all even numbered points... He opens his favorite text editor and quickly types somet...

   C,JavaScript,Sweet spot,Memory,Low level,Trap     2011-11-06 14:45:01