Server-Side Magazine

Community Resources

Smashing Magazine My Favorite Programming Mistakes

Over my programming career, I have made a lot of mistakes in several different languages. In fact, if I write 10 or more lines of code and it works the first time, I’ll get a bit suspicious and test it more rigorously than usual. I would expect to find a syntax error or a bad array reference or a misspelled variable or something. [...]

Separating Maven Unit & Integration Tests

In this example I will show how you can perform a standard Maven build whilst keeping your unit and integration tests in separate packages. [...]

Separating Code Coverage With Maven, Sonar and Jacoco

In this example I will expand upon my previous example of keeping your unit and integration tests in separate packages, and explain how to also produce code coverage statistics. [...]

Maven Multi-Module With Sonar and Jacoco

This blog shows how to seperate your unit and integration tests in a multi-module maven project whilst providing seperate test coverage results for each. [...]

10 examples of grep command in UNIX and Linux

“grep” one of the most frequently used UNIX command stands for “Global Regular Expression Print”. This grep command tutorial is not about theory of UNIX grep but to practical use of grep in UNIX and here I am sharing my experience [...]

How to become a proficient Python programmer

I will focus on four primary topics: Functional programming, performance, testing and code guidelines. When those four aspects merge in one programmer, he or she will gain greatness no matter what. [...]

Quick Ways to Boost Performance and Scalability of ASP.NET, WCF and Desktop Clients

There are some simple configuration changes that you can make on machine.config and IIS to give your web applications significant performance boost. These are simple harmless changes but make a lot of difference in terms of scalability. [...]

10 Caching Mistakes that Break your App

Caching large objects, duplicate objects, caching collections, live objects, thread unsafe caching and other common mistakes break your app instead of making it fly. Learn ten common caching mistakes devs make. [...]

Unit Testing and Integration Testing in Business Applications

This article presents some realistic unit and integration test examples in a N-tier web application to assist in writing tests that provide confidence in moving towards Test Driven Development (TDD) [...]

To push, or not to push, the Web Socket dilemma

Web Sockets is a relatively new specification introduced as part of HTML 5 to support a full duplex-communication channel over http in web browsers.  This  represents a great advance toward real-time and event driven web applications. Before Web Sockets jumped in scene, the only available  solutions for emulating real time notifications in web applications were different variants of Http Long polling. Real time notifications in this context became particularly important for specific scenarios, such as reporting stock pricing updates, online gaming or news reports to name a few. [...]

Proxying HTTP and Websockets in Node

This guide is geared toward beginners and people who are unfamiliar with reverse HTTP proxying, websocket proxing, load balancing, virtual host configuration, request forwarding, and other web proxying concepts – those who already know what they’re doing and just want to see the syntax should skip down to the sample code. [...]

SQL Server 10xs Faster with Rails 3.1

As you may have heard or seen, ActiveRecord 3.1 now comes with prepared statement support. This happens for you automatically since ActiveRecord will associate all SQL statements with bind substitute variables. The implementation of these is left to each database adapter. [...]

Advanced PHP Closed Captioned Training Video

This is the third closed captioned video in a series where we explore PHP6 and other advanced PHP concepts. From our Advanced PHP Course. We are happy to announce that we are well on our way to closed captioning all of our Web Design and Web Programming related video training courses. [...]

Create alias for class

Sometimes we need to use external libraries with strange and obscure class names, and it can be really annoying. Luckily, from PHP 5.3 version we can create aliases for classes and interfaces with class_alias function. Example of class_alias usage. [...]

Working with date and time in object oriented way

Date and time manipulation in PHP is mostly connected with functions like: date, time or strtotime. They can be sufficient, but if we want to deal with dates like with objects – we can use DateTime class. DateTime class is not only straightforward wrapper for standard functions, it has a lot of additional features [...]

SQL Server: Quickest Method to Create Single Table Backup

There are several ways to create backup for a single table in SQL Server database. In SQL Server 2008, now you can create insert statements for selected tables. Beside this Export wizard is commonly used to create a flat file backup for a single table. Both methods are reliable but still time consuming. [...]

Introduction to LINQ

Language-Integrated Query—LINQ—is a new data-access feature that does exactly what it says: allow for querying of data sources from within the language itself. [...]

Installing Node.js and NPM on Ubuntu 11.04

In my last article I installed Node on Ubuntu 10.10. Nothing really has changed for Ubuntu 11.04 but I want to have a separate article since a lot of people hit my installing Node articles. Also, keep in mind you [...]

The Storage Technologies Behind Facebook Messages [Video]

The engineering team behind Facebook Messages spent the past year building out a robust, scalable infrastructure. We spent a few weeks setting up a test framework to evaluate clusters of MySQL, Apache Cassandra, Apache HBase, and a couple of other [...]

Learn MVC (Model view controller) Step by Step in 7 days

As the article name says learn MVC, so the agenda is simple we are going to learn ASP.NET MVC [...]

How To Get That Edge Ruby Faster-Loading-Hotness in Ruby 1.9.2 Now

As the current production version of Ruby, a boost for Ruby 1.9.2-p180 should benefit most of you so I knew I had to share Todd’s work as soon as I’d given it a test run. I ran the same benchmarks [...]

Strategies for refactoring untestable PHP code

With the growth of PHP from a simple scripting language to a full-fledged programming language, there has been a parallel growth in the complexity of the code bases of a typical PHP application. To control support and maintenance of these applications, various testing tools help automate this process. [...]

Purging Zend Server’s Job Queue.

Zend Server is great. It kicks WAMP & MAMP’s butt. My favorite feature is the job queue – it offers an object oriented, cross-platform, cron-like paradigm. It’s really handy. [...]

PHP Multithreading with cURL

Some applications need to perform several tasks that may take a while to finish. When there are many tasks to execute, it may take a long time to finish all of them if they are executed sequentially, i.e., one after another. A possible solution for this problem is to execute several tasks at the same time using separate processes or threads. [...]

Rethinking Models in MVC

Jon Galloway is researching dynamic ASP.NET MVC 3 models using Mono’s Compiler as a Service. Meanwhile Karsten Januszewski is looking into deserialized JSON in lieu of statically typed models. [...]

Optimizing MongoDB [Slides]

Lessons learned at Localytics [...]

Apache Dynamic Virtual Hosting and PHP security

t’s been a while since I configured the latest Dynamic Mass Virtual Hosting Server. Last time I used mod_vhost_alias to create a dynamic virtual hosting and it worked without any problem for what we need in that time. Then we didn’t care about the ftp and virtual users, the sites was updated from web pages and security was pretty much handled by upload application who managed the virtual hosting. Now, the problem is a little bit changed: [...]

Strategies for refactoring untestable PHP code

Many developers these days inherit legacy projects, littered with spaghetti code and poor design. The initial task is often to write unit tests and refactor, but how does one get started with writing unit tests with code clearly designed not to? Examine several anti-patterns of testable PHP code, and how to refactor and enable the code to be easily tested. [...]

Rolling Up Your Sleeves and Getting into the Nitty Gritty of I18n in WordPress

When you are localizing a theme, you’ll usually only be addressing text strings that appear in different places of your theme. [...]

The History of UTF-8

Looking around at some UTF-8 background, I see the same incorrect story being repeated over and over. The incorrect version is: [...]

Realtime Hadoop usage at Facebook — Part 2 – Workload Types

This is the second part of our SIGMOD-2011 paper that describes our use case for Apache Hadoop and Apache HBase in realtime workloads. You can find the first part here. We describe why Hadoop and HBase fits the requirements of each of these applications. [...]

The Zenbi Architecture: New Approach to Java Software Development

I would like to give you an insight into the Zenbi Architecture: a new Client-Server Architecture, built around RMI, JavaFX and Cloud Computing, that rivals J2EE in many aspects, has the best theoretically achievable scalability and was the basis for founding my company, Zenbi. [...]

The Story Behind Ruby 1.9.3 Getting 36% Faster Loading Times

Xavier Shay is an Australian Rubyist who shares an issue with most of us: slow loading Rails 3 apps on Ruby 1.9.2! Unlike most of us, he put together a solution for ruby-head (what I’m calling 1.9.3 but isn’t technically*) that, in my own tests, slashed 37% off the boot time of my Rails 3.0 app. He shared his work just a week ago. Awesome! But some other developments have occurred since [...]

How Volatile in Java works ? Example of volatile keyword in Java

Volatile keyword in Java is used as an indicator to Thread that do not cache value of this variable and always read it from main memory. So if you want to share any variable in which operations read and write is atomic by implementation e.g. read and write in int or boolean variable you can make it volatile. [...]

Jeremy Cole: Big and Small Data at @Twitter [Video]

O’Reilly MySQL CE 2011: Jeremy Cole, “Big and Small Data at @Twitter”

Diving into ASP.NET MVC 3 Model Metadata Providers

ASP.NET MVC provides a great support for DataAnnotation attributes which can be used to enable rich metadata behavior within MVC models. ASP.NET MVC 3 introduced the support for new DataAnnotation DisplayAttribute. ModelMetadataProvider can be used to create ModelMetadata based on the model [...]

An introduction to MongoDB

MongoDB is a scalable, high-performance, document-oriented schemaless database. In this short demo, long-time developerWorks contributor Andrew Glover introduces MongoDB, provides a quick tour of its use, and helps you understand where it’s most applicable. [...]

Quick Tip: Integrate Compass into an Existing CodeIgniter Project

I was recently asked about how to use Compass in an existing CodeIgniter project. It seems that the emailer was under the impression that Compass was made for Ruby and Rails. But that’s not the case at all! [...]

Connecting PHP to ActionScript and Flex using Stomp

In yesterday’s post I talked a little bit about some of the details on how I used messaging to connect a front end on demand request to a back end scheduled data processing mechanism.  In this post we’re going to talk about how to send data from a web page to a running Flex application [...]

Custom Finders with Lithium

In this post we’ll take a look at custom finders and how they can help you DRYing up your code. [...]

SOLID OO Principles

In Object Oriented Design, there are a handful of principles that should drive everything else. Ideally, we want everything to be “loosely coupled.” There are a variety of ways to accomplish that but generally as long as we keep the internals of classes hidden from one another, we’re on the right path. Further, we want everything to be “highly cohesive” where like things are together.. but is that enough? [...]

Advanced PHP Closed Captioned Training Video – Auto-Loading Classes with Namespaces Part 1

This is the first of a series of closed captioned videos where we explore PHP6 and other advanced PHP concepts, concepts often seen in PHP frameworks like Zend, PHP Cake and others. From our Advanced PHP Course. [...]

10 Python One Liners to Impress Your Friends

After 10 Scala / Ruby / Clojure / CoffeeScript one liners to impress your friends, i thought it might be interesting to quickly try out the same in Python too. [...]

Node.js, Evented I/O, and a Cup of Tea

All Arthur Dent really wanted was a cup of tea. I was reading The Restaurant at the End of the Universe by Douglas Adams, and I found a humorous example of event driven programming. So I thought I would share. The Story Arthur Dent was one of the last surviving humans after Earth had been [...]

PHP Performance Tips from Google

PHP is a very popular scripting language, used on many popular sites across the web. In this article, we hope to help you to improve the performance of your PHP scripts with some changes that you can make very quickly and painlessly. Please keep in mind that your own performance gains may vary greatly, depending on which version of PHP you are running, your web server environment, and the complexity of your code. [...]

Language Fluency in WordPress: Understanding the Basics of I18n

With the worldwide success and geographical reach of WordPress, it’s pretty easy to understand why it’s useful to be able to seamlessly translate plugins, themes and WordPress itself into other languages. [...]

Finding duplicate files using Python

I wrote this script to find and optionally delete duplicate files in a directory tree. The script uses MD5 hashes of each file’s content to detect duplicate files. This script is based on zalew’s answer on stackoverflow. So far I have found this script sufficient for accurately finding and removing duplicate files in my photograph collection. [...]

HOW TO: Add the +1 Button to Your WordPress Site

Google turned up the heat on its +1 feature Wednesday, rolling out the new +1 button across select partners sites (including Mashable) and introducing a new tool for publishers to embed it on their own sites. [...]

SQL Server: Search Similar String in a Table

There are may ways to look for similar strings in a SQL Server column. The most common method is to make use of LIKE operator. Let us see the different ways to look for similar string in a table. [...]

Setting up PostgreSQL for Ruby on Rails development on OS X

One of the reasons people used to give for using MySQL over PostgreSQL (just ‘Postgres’ from here on in) was that Postgres was considered hard to install. It’s a shame, because it’s a great database (I’ve been using it for personal and some work projects for years, like my current side project, sendcat). Luckily it’s now really simple to get it going on your Mac to give it a try. This is how you do it. [...]

Page 1 of 1312345...10...Last »