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

SEARCH KEYWORD -- Magic number



  "Simplicity" is not a simple concept

I've come to avoid using the word "Simplicity" or its variants ("Simple," &c.) It means too many different things to different people.For example, my original land-line phone was simple:It's simple by eliminating extraneous use cases. It only handles one user scenario, the one that was the most common when it was invented. If we think of the number of affordances and the number of uses, this kind of simplicity lowers the number of affordances by lowering the number of uses. I call this kind ...

   Simplicity,Software,Usability,iPhone,Phone     2011-11-24 09:21:09

  Some laws of interactive design

The well known quote from Alan Cooper is   Conforming to the standard unless there is a better choice. There are some best practices in interaction design. How many do you know? 1. Fitts' Law The time from one start point to target point is determined by two parameters: The distance to the target and the size of the target. )D and W in above picture), the formula is : T=a+blog2(D/W+1). It was first proposed by Paul Fitts, it is mathematical model used to predict the time from any poin...

   interaction design, laws, Fitts' law     2012-11-16 11:25:24

  PHP function overloading puzzle clearer

PHP's meaning of overloading is different than Java's. In PHP, overloading means that you are able to add object members at runtime, by implementing some of the __magic methods, like __get, __set, __call, __callStatic. You load objects with new members. Overloading in PHP provides means to dynamically "create" properties and methods. These dynamic entities are processed via magic methods one can establish in a class for various action types. Some example:class Foo{    p...

   PHP,function overloading,OOP,default val     2011-07-11 03:24:30

  The magic of go:linkname

When writing Go program, there is frequent need on using time.Sleep() function to pause the logic for some time. And if jumping to the definition of this function, can see below definition: // Sleep pauses the current goroutine for at least the duration d. // A negative or zero duration causes Sleep to return immediately. func Sleep(d Duration) I's strange that there is no function body defined here. What happened? The actual definition of the function body is residing at runtime/time.go&nb...

   TRICKS,GO:LINKNAME,GOLANG     2022-04-10 08:39:00

  JavaScript-style object literals in PHP

The object literal notation in JavaScript looks like: var fido = {name: "Fido", barks: true}; or var fido = {}; fido.name = "Fido"; fido.barks = true; From assoc arrays to objects In PHP you would call that an associative array. $fido = array( 'name' => "Fido", 'barks' => true ); And you can easily make it an object too: $fido = (object)$fido; echo gettype($fido); // "object" Or if you want to start with a blank object and add stuff to it: $fido = (object)array(); or $fido...

   PHP,JavaScript,Object,Function call,Self vs this     2011-11-30 11:11:45

  22 Awesome Admin Panels For Web Developers

On internet, there are number of tutorials are available to learn how to create website designs, that makes your work more easier and simple. But users don’t know what processing going in back end part. Today we are providing some awesome admin panel that helps programmers to operate websites’ s back end section. Now a days, A big number of admin panels are available that always makes your project more easier. These panels has useful features and functionality that make it mo...

   Web design,Admin panel,Backend system,De     2011-08-23 08:02:06

  In praise of impractical programming

Although it’s become a cultural mainstay now, I still remember when I first saw that thick book — the one with the wizard on the cover — about a school for magic where wonders are easily conjured by those who know the proper spells. Of course, I’m talking about the Structure and Interpretation of Computer Programs. There was that other book with the spells, but the “Wizard Book” sincerely claimed to teach magic. For the past few years, I’ve been ...

   Impractical Programming,Structure,Scheme,Practical     2011-12-05 12:28:58

  Add page number anywhere in word document

Have you ever frustrated when you want to add page number in a Microsoft word document start from page 2 or later. The way to ease you is to add sections to the word document in which page you want to add page number. The procedures are (in Word 2007) :1. Goto Page Layout->Breaks->Section breaks.2. In Section Breaks zone, you can choose Next Page and some others way to set sections.3. Then when you want to add the page number into next section. Go to Insert->Page Number->Format ...

   Office 2007, Word, Page number, Section,     2011-04-08 04:00:53

  Preprocessor magic:Default Arguments in C

This post is for programmers who like C or for one reason or another can't use anything else but C in one of their projects. The advantages of having default arguments is not something that needs convincing. It's just very nice and convenient to have them. C++ offers the ability to define them but C under the C99 standard has no way to allow it. In this post I will detail two ways I know of implementing default arguments in C. If a reader happens to know additional ways please share in ...

   C,Preprocessor,Default arguments     2012-02-19 06:17:04

  Creativity requires isolation

How many times have you tried to get something done that needed some touch of originality and creativity and yet got that annoying mind block which is manifested by blank stares, scratching and biting on anything in reach? “all the damn time” I hear? As preconditions to be creative, one should know something well while having the utmost focus on it. Someone who knows little about aerodynamics can’t come up with the idea for next concord. And focus has two aspects: kno...

   Creativity,Isolation,Quiet,Paper,Pen     2011-11-28 09:33:57