40 Tips for optimizing your php Code – reinholdweber.com

reinholdweber.com
40 Tips for optimizing your php Code

1. If a method can be static, declare it static. Speed improvement is by a factor of 4.
2. echo is faster than print.
3. Use echo’s multiple parameters instead of string concatenation.
4. Set the maxvalue for your for-loops before and not in the loop.
5. Unset your variables to free memory, especially large arrays.
6. Avoid magic like __get, __set, __autoload
7. require_once() is expensive
8. Use full paths in includes and requires, less time spent on resolving the OS paths.
9. If you need to find out the time when the script started executing, $_SERVER[’REQUEST_TIME’] is preferred to time()
10. See if you can use strncasecmp, strpbrk and stripos instead of regex
11. str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4
12. If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one line of code that accepts arrays as search and replace arguments.
13. It’s better to use select statements than multi if, else if, statements.
14. Error suppression with @ is very slow.
15. Turn on apache’s mod_deflate
16. Close your database connections when you’re done with them
17. $row[’id’] is 7 times faster than $row[id]
18. Error messages are expensive
19. Do not use functions inside of for loop, such as for ($x=0; $x < count($array); $x) The count() function gets called each time.
20. Incrementing a local variable in a method is the fastest. Nearly the same as calling a local variable in a function.

Xen Cluster Management With Ganeti On Debian Etch | HowtoForge – Linux Howtos and Tutorials

Xen Cluster Management With Ganeti On Debian Etch | HowtoForge – Linux Howtos and Tutorials
Ganeti is a cluster virtualization management system based on Xen. In this tutorial I will explain how to create one virtual Xen machine called an instance on a cluster of two physical nodes, and how to manage and failover this instance between the two physical nodes.

How To Create a Web App – readwriteweb.com

How To Create a Web App
Written by Matt Rogers / October 4, 2007

This is the second post in our series on how to run a startup and develop a product. In part one, How To Bootstrap Your Startup, we outlined the process of bootstrapping your company into existence. In this post, we show you how to go from idea to specified product. By the end of it, you’ll know how to build a mock-up of your business idea and write the most important document you’ll write for the company: your functional specification.

For a simple system the process outlined in this post should take you a month. For a complex build, there will be a lot more research and your mock-up and functional specification will be big – so budget 3 months of full-time work.

How To Bootstrap Your Startup – readwriteweb.com

How To Bootstrap Your Startup
Written by Matt Rogers / September 10, 2007

The first in a series of posts about how to run a startup and develop a product, written by guest author Matt Rogers of Aroxo – a person-to-person trading exchange for consumer electronics, computer gear, whitegoods, and more.

The aim of many entrepreneurs is to take a business idea and convert it into a professional and functioning business on a low budget. This is typically called “bootstrapping” and it is fraught with potential pitfalls and dangers. But when done well it can really help get a company going fast, professionally and without the founders having to give up much if any equity – or bankrupting themselves.

Over the next 5-6 posts I’ll outline the process which I’ve now followed at several corporates and which I’ve honed to work with my own startup, Aroxo. I’ll discuss what skills you’ll need, how to write your requirements, how to source developers and designers, how much to budget, how to agree a development contract, how to manage your vendors, how to plan your release, all the documentation youll need, and much more.

XP Run Commands / Short Cuts :1 – The New Tech

XP Run Commands / Short Cuts :1 – The New Tech
Windows XP Home / Pro Run Commands and Short Cuts

How To – Click Start, Click Run and enter the command Click OK

Run commands

Calc – Calculator
Cfgwiz32 – ISDN Configuration Wizard
Charmap – Character Map
Chkdisk – Repair damaged files
Cleanmgr – Cleans up hard drives
Clipbrd – Windows Clipboard viewer
Cmd – Opens a new Command Window cmd.exe
Control – Displays Control Panel
Dcomcnfg – DCOM user security
Debug – Assembly language programming tool
Defrag – Defragmentation tool
Drwatson – Records programs crash & snapshots
Dxdiag – DirectX Diagnostic Utility
Explorer – Windows Explorer
Fontview – Graphical font viewer
Ftp – ftp.exe program
Hostname – Returns Computers name
Ipconfig – Displays IP configuration for all network adapters
Jview – Microsoft Command-line Loader for Java classes
MMC – Microsoft Management Console
Msconfig – Configuration to edit startup files
Msinfo32 – Microsoft System Information Utility
Nbtstat – Displays stats and current connections using NetBios over TCP/IP
Netstat – Displays all active network connections
Nslookup- Returns your local DNS server
Ping – Sends data to a specified host/IP
Regedit – egistry Editor
Regsvr32 – egister/de-register DLL/OCX/ActiveX
Regwiz – Reistration wizard
Sfc /scannow – Sytem File Checker
Sndrec32 – Sound Recorder
Sndvol32 – Volume control for soundcard
Sysedit – Edit system startup files config.sys, autoexec.bat, win.ini, etc.
Taskmgr – Task manager
Telnet – Telnet program
Tracert – Traces and displays all paths required to reach an internet host
Winipcfg – Displays IP configuration

Follow

Get every new post delivered to your Inbox.