If you are registered on GitHub , like me , might make you comfortable this application for OS X for Mac GitHub . It allows you to manage the repository so simple, thanks to the excellent minimal and intuitive GUI. Nice thing is that the application can be activated directly from the page when you want to clone a GitHub repository:

Continued ...
When no longer working alone for all developers comes time to find guidance in the writing of code. Protocols and standards that make it possible to "read" easily and intervene (more easily) in the code of others.
When we are working on a project more programmers, often of different languages, you must find a common form of writing, internal and external documentation standards in the code. In my work I am usually to interact with:
- Objet-C, C / C + +
- PHP
- HTML
- JavaScript
- Actionscript
- CSS
Continued ...
The use of conditions within the browser is often used to decide which style sheet to load depending on the type of browser. For example we can use this code to load a particular style sheet when the browser is Internet Explorer 6:
Continued ...
If we rely on the simple example hellodolly.php provided by WordPress , or even the same official documents, never comes to writing a good and efficient plug-in. We want here to analyze a possible structure, then a skeleton that can be used multiple times.
Continued ...
Thanks to the suggestions and advice of David Salerno I have tried to optimize the loading of undolog.com, activities which, for reasons of "time", I always put off. In fact I was not able to apply all the valuable tips of David, but I managed to give a nice "clean up" and reduce loading times anyway!
Reduction of Widgets, and Badget antipixel
The first thing I did was to minimize the burden placed by the various widgets in the blog:
- I dropped the lines displayed in widgets MyBlogLog : 10 to 5 lines
- I deleted the blogroll from antipixel
- The library aNoobi shows 2 books instead of 5
Continued ...
It seems obvious, but some escape the subtle difference between constants and variables in a programming language. The constants, from the name, do not change their value during the cycle of a program, while variables can do it! Often, however, happen to use variables instead of constants without realizing it, also because this does not impact the logic of an application. Despite this, the difference between constants and variables, and there emerges all at compile time, where the constant plays a role certainly more powerful.
Coming from C or Assembly programming knows the difference between constants and variables, especially because, in both assembly and C, constants play a role by MACRO. For MACRO meant in a "piece of code" that is labeled and replaced in the code at compile time. The compiler, in short, performs a kind of find .. replace (and is sostituitsci) in the code each time it encounters a constant.
Imagine you write in C, the following simple piece of code:
1 2 3 4
| 5 ; int a = 5; 3 ; int b = 3; int c; b ; c = a + b; |
sono indicate come variabili in questo caso. Whether a which b are shown as variables in this case. In C, in fact, the constants are defined with the keyword #define . sono state definite come int . We note immediately that a which b has been defined as int . Already here you can make a first optimization. If we know that our variable a never exceed a certain value, you should declare it properly and do not use data types at random. Some developers do not bother to declare the correct types, thinking that this does not affect the performace! Wrong! Alternatively, it is acceptable that the first draft of the code does not involve this level of detail. However, it is a good rule, during the development process, review the code and check the data types.
However, in an assembly of the Motorola family, for example, like the mythical 68000, would seize our code compiled (without optimizations) into a kind of:
1 2 3 4
| , d0 ; int a move. the # 5, d0; int , d1 ; int b move. the # 3, d1, int b d2 ; int c - foo move. the d1, d2, int c - foo l d0 , d2 ; risultato in d2 ovvero c add. the d0, d2, d2, or result in c |
or:
1 2 3
| , d0 ; int a move. the # 5, d0; int , d1 ; int b move. the # 3, d1, int b d1 ; risultato in d1... move. l d0, d1, d1 result ... |
The compiler, however clever, effort in optimizations, then write the code with the right keyword can only help to improve the compiled output. In our case, if the value 5 is a constant is not convenient to use an integer variable, because the compiler, and rightly so, considering the variable variable, in fact, an entire predisponde easy to contain the value 5, which in binary is 101, ie occupies three single bits (if anything, int is a 32bit or 53bit worst a double-precision floating point!). If we had written the code like this:
1 2 3 4 5
| 5 # define MIA_COSTANTE
3 ; int b = 3; int c; b ; c = b + MIA_COSTANTE; |
The compiler would know from the outset that MIA_COSTANTE , being constant, the value will not change so I can reserve less space to treat it. In practice the Assembly code diverebbe:
1 2 3
| d0 ; la "q" indica una istruzione "quick", cioè che tratta valori compresi tra -128 e +127 moveq # 3, d0; the "q" indicates a statement "quick", that is values between -128 and +127 , A statement "quick" takes less CPU time (4 clock cycles in this case) d0 ; anche qui uso una istruzione "quick" addq # 5, d0; here an instruction manual "quick" |
This code is very fast and takes up less bytes. What we must keep in mind is that when you declare a variable environment prepares to treat it as such, even if today's compilers can do miracles, performing a series of steps in the code before compiling (some compilers, even perform a kind of simulation program to optimize the compilation into machine code).
A good rule, therefore, is to declare the right kind for our variables, though these are. Alternatively use the constants, especially if the programming language we are using the expected (as in the case of the new Flash CS3).
Continued ...
Latest Comments
Robert : I rispsoto your questions with pleasure. The idea is really great. I am looking for a solution ...
Sting : @ Darius - you can see an example here: http://www.fight4fun.it/ clicking on: MAPS I hope ...
vik : Giustappunto I'm working on a project and the client asked me to show all the news (which are CPT) in ...
Giovambattista Fazioli : @ paso: absolutely. Simply identifying the field [cci] input [/ cci] you want to ...
paso : Hello I would like to request a service, you can use the datepicker with cform7 I spiegp best I can implement ...