Monday, March 30, 2009

Good programming/math literature


Found this interesting read at stackoverflow.com. 

The Numerati by Stephen Baker
Innumeracy by John Allen Paulos
The Millenium Problems by Keith Devlin
Supercrunchers - similar to The Numerati.
The Code book is also really interesting and relatively easy to understand.
Out of Control by Kevin Kelly. The full text is actually available online from his own site




Wednesday, March 25, 2009

The C# ?? null coalescing operator

One of the subtle (but cool) language features of C# is the ?? "null coalescing" operator.  This provides a nice, terse way to check whether a value is null, and if so return an alternate value.







Hidden Features of C#

Awesome post on stackoverflow.com


Flavors of MVP

Flavors of MVP

Dino Esposito, Feb 19, 2009

Dino Esposito continues his overview of the MVP design pattern.


Evergreen but still topical: MVC vs. MVP

Dino Esposito, Jan 15, 2009

Dino Esposito compares the MVC and MVP design patterns.

97 Things Every Software Architect Should Know

97 Things Every Software Architect Should Know isn’t really a book… it’s pretty much a collection of bits of wisdom and advice from a bunch of leading software architects. There are no chapters, there is no unifying theme, there is no structure whatsoever. There is just a lot of great content. Around 50 software architects contributed 97 pieces to the book, each one filling up about 2 (small) pages. In a way, reading these pieces feels like reading great blog posts, though without the usual blogodrama. It’s great stuff for when you want to spend an hour reading, or for when you have a couple of minutes to spare. 

There’s even a website which contains all of the original, unedited contributions so the cheapskates among you can read it all as well

Thursday, March 19, 2009

dnnGallery - Showcase your DNN work

dnnGallery created with the mission to spread the talent of businesses and individuals to the world relating to DotNetNuke and to create a reliable source of inspiration for users.


3 great examples of jQuery's power

  1. President's Website
  2. Commerce bank
  3. Netflix

Riding carousels with jQuery

This is simply awesome:

jCarousel is a jQuery plugin for controlling a list of items in horizontal or vertical order. The items, which can be static HTML content or loaded with (or without) AJAX, can be scrolled back and forth (with or without animation).



Azue Service Platform - Resources



jQuery Demos

jQuery 

   UI  stuff - jqueryui.com.  (DatePicker is cool, I like the UI Darkness Theme)
   Plugins - http://plugins.jquery.com/ (EasyNews is nice, Agile Carousal is sweet)


Special mention:

(I love the mbGallery and mbMenu)



Using jQuery In DotNetNuke 5.0

Check out Joe Brinkman's post about full support for jQuery starting in DotNetNuke 5.0.


Awesome!


stackoverflow.com - get your questions answered or answer others'

Stack Overflow is a collaboratively edited question and answer site for programmers — regardless of platform or language.

Update - I just found out that this site uses JQuery - no wonder its so freaking fast! I am starting to love JQuery (Write less, do more...)

Firebug

Firebug integrates with Firefox to put a wealth of web development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

Just the way you like it

Firebug is always just a keystroke away, but it never gets in your way. You can open Firebug in a separate window, or as a bar at the bottom of your browser. Firebug also gives you fine-grained control over which websites you want to enable it for.

Learn more

Inspect and edit HTML

Firebug makes it simple to find HTML elements buried deep in the page. Once you've found what you're looking for, Firebug gives you a wealth of information, and lets you edit the HTML live.

Learn more

Tweak CSS to perfection

Firebug's CSS tabs tell you everything you need to know about the styles in your web pages, and if you don't like what it's telling you, you can make changes and see them take effect instantly.

Learn more

Visualize CSS metrics

When your CSS boxes aren't lining up correctly it can be difficult to understand why. Let Firebug be your eyes and it will measure and illustrate all the offsets, margins, borders, padding, and sizes for you.

Learn more

Monitor network activity

Your pages are taking a long time to load, but why? Did you go crazy and write too much JavaScript? Did you forget to compress your images? Are your ad partner's servers taking a siesta? Firebug breaks it all down for you file-by-file.

Learn more

Debug and profile JavaScript

Firebug includes a powerful JavaScript debugger that lets you pause execution at any time and have look at the state of the world. If your code is a little sluggish, use the JavaScript profiler to measure performance and find bottlenecks fast.

Learn more

Quickly find errors

When things go wrong, Firebug lets you know immediately and gives you detailed and useful information about errors in JavaScript, CSS, and XML.

Learn more

Explore the DOM

The Document Object Model is a great big hierarchy of objects and functions just waiting to be tickled by JavaScript. Firebug helps you find DOM objects quickly and then edit them on the fly.

Learn more

Execute JavaScript on the fly

The command line is one of the oldest tools in the programming toolbox. Firebug gives you a good ol' fashioned command line for JavaScript complete with very modern amenities.

Learn more

Logging for JavaScript

Having a fancy JavaScript debugger is great, but sometimes the fastest way to find bugs is just to dump as much information to the console as you can. Firebug gives you a set of powerful logging functions that help you get answers fast.

Learn more


Wednesday, March 18, 2009

Azure™ Services Platform

This morning I learned about Windows Azure services platform. Our company had a guy from Microsoft do a presentation. Very interesting and inspiring. I had heard about Cloud computing on several blogs before, but truly realized its power in this session.

Being an entrepreneur, I really think Azure (and other Cloud computing platforms) levels the playing field for Entrepreneurs. Instead of worrying about servers, databases, hosting etc, we can now focus on the core idea and use the "cloud" as the publishing platform. It's awesome, specially in the times we are in, economically speaking!  


"Cloud computing will change how we do IT, end-to-end, over the next five years," says Chuck Hollis, vice president of global marketing at EMC, the Hopkinton-based storage firm.

Before we talk about Azure, let's talk about Cloud Computing.

According to Wikipedia:

Cloud computing is Internet ("cloud") based development and use of computer technology ("computing"). It is a style of computing in which dynamically scalable and often virtualised resources are provided as a service over the Internet. Users need not have knowledge of, expertise in, or control over the technology infrastructure "in the cloud" that supports them. 

The concept incorporates infrastructure as a service (IaaS), platform as a service (PaaS) and software as a service (SaaS) as well as Web 2.0 and other recent technology trends which have the common theme of reliance on the Internet for satisfying the computing needs of the users.

Cloud Computing explained by Canon O' Brian's Twin Brother:


The cloud computing space is now really heating up with competing platform plays from Google’s AppEngine and Amazon’s recent EC2 announcements. In some sense this is perhaps the re-birth of Windows as a platform that enables developers and the ecosystem to build on a whole new set of capabilities and scale for the Software+Services world, in much the same way as Windows fueled the desktop software industry in the past "era". 

The really compelling thing about this particular development platform especially combined with other technologies such as Mesh, SQL and Silverlight is that you’re likely already familiar with it - if you’ve been developing ASP.NET and .NET applications using Visual Studio, either on the desktop or your own servers or hosted servers, you’re already got a good head start in working against this new platform.


What is the Azure Services Platform?

The Azure™ Services Platform (Azure) is an internet-scale cloud services platform hosted in Microsoft data centers, which provides an operating system and a set of developer services that can be used individually or together. Azure’s flexible and interoperable platform can be used to build new applications to run from the cloud or enhance existing applications with cloud-based capabilities. Its open architecture gives developers the choice to build web applications, applications running on connected devices, PCs, servers, or hybrid solutions offering the best of online and on-premises.

Azure reduces the need for up-front technology purchases, and it enables developers to quickly and easily create applications running in the cloud by using their existing skills with the Microsoft Visual Studio development environment and the Microsoft .NET Framework. In addition to managed code languages supported by .NET, Azure will support more programming languages and development environments in the near future. Azure simplifies maintaining and operating applications by providing on-demand compute and storage to host, scale, and manage web and connected applications. Infrastructure management is automated with a platform that is designed for high availability and dynamic scaling to match usage needs with the option of a pay-as-you-go pricing model. Azure provides an open, standards-based and interoperable environment with support for multiple internet protocols, including HTTP, REST, SOAP, and XML.

Microsoft also offers cloud applications ready for consumption by customers such as Windows Live™, Microsoft Dynamics™, and other Microsoft Online Services for business such as Microsoft Exchange Online and SharePoint® Online. The Azure Services Platform lets developers provide their own unique customer offerings by offering the foundational components of compute, storage, and building block services to author and compose applications in the cloud. 




Write Applications to Run On Windows Azure

Developers can start by writing applications to Windows Azure™ by using the Microsoft® .NET Framework and Microsoft Visual Studio®. Write web or mobile applications or author web services. In the future there will be support for both Microsoft and non-Microsoft programming languages and development environments.


Once you’re done coding the application, deploy it to the cloud and run it in Windows Azure and make it available via the internet to your end users. Scale compute capacity up or down based on traffic.



Use Azure Services In Online and On-Premises Applications

Take your cloud application to the next level by adding new functionality using additional Azure services. Use Live Services to reach over 460 million Live users, Microsoft .NET Services for workflow, access control, or service bus functionality, or use the Microsoft SQL Services cloud database. Developers can also write applications and web services that can be consumed by business partners or consumers.

Additionally, Azure services can also be used to augment an existing application that runs on a PC or a server to give on-premises software cloud capabilities. The services use industry standard SOAP, REST and XML protocols so using them won’t be a problem regardless of the operating system or programming language you’re using.


Bring It All Together


The Azure Services Platform is a cloud operating system and collection of services that can deliver web, mobile, or hybrid software-plus-services applications to users. Existing software can utilize the services to add cloud capabilities, and developers can easily write applications for the cloud to be used by end users, or write services that can be consumed within other applications.

Download the Azure Services Platform training Kit (February update)

The Azure Services Training Kit February update is now available and includes the following content covering Windows Azure, .NET Services, SQL Services, and Live Services:

13 hands-on labs – This includes 3 new hands-on labs for Live Framework & Services in addition to the hands-on labs released in the previous version of the kit.

19 new demo scripts – The demo scripts are designed to provide detailed walkthroughs of key services and features so that you can easily present a demo and better understand the services.

10 new presentations – These PowerPoint presentations can be used to deliver presentations at user groups or other training events.


Download the SDKs to experiment with the Azure locally



Monday, March 16, 2009

Books I am thinking of buying...

Miles to Go
by Miley Cyrus (Author) (For my niece)



Pragmatic Software Development Tips

Care About Your Craft
Why spend your life developing software unless you care about doing it well?

Provide Options, Don’t Make Lame Excuses
Instead of excuses, provide options. Don’t say it can’t be done; explain what can be done.

Be a Catalyst for Change
You can’t force change on people. Instead, show them how the future might be and help them participate in creating it.

Make Quality a Requirements Issue
Involve your users in determining the project’s real quality requirements.

Critically Analyze What You Read and Hear
Don’t be swayed by vendors, media hype, or dogma. Analyze information in terms of you and your project.

DRY—Don’t Repeat Yourself
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

Eliminate Effects Between Unrelated Things
Design components that are self-contained, independent, and have a single, well-defined purpose.

Use Tracer Bullets to Find the Target
Tracer bullets let you home in on your target by trying things and seeing how close they land.

Program Close to the Problem Domain
Design and code in your user’s language.

Iterate the Schedule with the Code
Use experience you gain as you implement to refine the project time scales.

Use the Power of Command Shells
Use the shell when graphical user interfaces don’t cut it.

Always Use Source Code Control
Source code control is a time machine for your work—you can go back.

Don’t Panic When Debugging
Take a deep breath and THINK! about what could be causing the bug.

Don’t Assume It—Prove It
Prove your assumptions in the actual environment—with real data and boundary conditions.

Write Code That Writes Code
Code generators increase your productivity and help avoid duplication.

Design with Contracts
Use contracts to document and verify that code does no more and no less than it claims to do.

Use Assertions to Prevent the Impossible
Assertions validate your assumptions. Use them to protect your code from an uncertain world.

Finish What You Start
Where possible, the routine or object that allocates a resource should be responsible for deallocating it.

Configure, Don’t Integrate
Implement technology choices for an application as configuration options, not through integration or engineering.

Analyze Workflow to Improve Concurrency
Exploit concurrency in your user’s workflow.

Always Design for Concurrency
Allow for concurrency, and you’ll design cleaner interfaces with fewer assumptions.

Use Blackboards to Coordinate Workflow
Use blackboards to coordinate disparate facts and agents, while maintaining independence and isolation among participants.

Estimate the Order of Your Algorithms
Get a feel for how long things are likely to take before you write code.

Refactor Early, Refactor Often
Just as you might weed and rearrange a garden, rewrite, rework, and re-architect code when it needs it. Fix the root of the problem.

Test Your Software, or Your Users Will
Test ruthlessly. Don’t make your users find bugs for you.

Don’t Gather Requirements—Dig for Them
Requirements rarely lie on the surface. They’re buried deep beneath layers of assumptions, misconceptions, and politics.

Abstractions Live Longer than Details
Invest in the abstraction, not the implementation. Abstractions can survive the barrage of changes from different implementations and new technologies.

Don’t Think Outside the Box—Find the Box
When faced with an impossible problem, identify the real constraints. Ask yourself: ``Does it have to be done this way? Does it have to be done at all?’‘

Some Things Are Better Done than Described
Don’t fall into the specification spiral—at some point you need to start coding.

Costly Tools Don’t Produce Better Designs
Beware of vendor hype, industry dogma, and the aura of the price tag. Judge tools on their merits.

Don’t Use Manual Procedures
A shell script or batch file will execute the same instructions, in the same order, time after time.

Coding Ain’t Done ‘Til All the Tests Run
‘Nuff said.

Test State Coverage, Not Code Coverage
Identify and test significant program states. Just testing lines of code isn’t enough.

English is Just a Programming Language
Write documents as you would write code: honor the DRY principle, use metadata, MVC, automatic generation, and so on.

Gently Exceed Your Users’ Expectations
Come to understand your users’ expectations, then deliver just that little bit more.

Think! About Your Work
Turn off the autopilot and take control. Constantly critique and appraise your work.

Don’t Live with Broken Windows
Fix bad designs, wrong decisions, and poor code when you see them.

Remember the Big Picture
Don’t get so engrossed in the details that you forget to check what’s happening around you.

Invest Regularly in Your Knowledge Portfolio
Make learning a habit.

It’s Both What You Say and the Way You Say It
There’s no point in having great ideas if you don’t communicate them effectively.

Make It Easy to Reuse
If it’s easy to reuse, people will. Create an environment that supports reuse.

There Are No Final Decisions
No decision is cast in stone. Instead, consider each as being written in the sand at the beach, and plan for change.

Prototype to Learn
Prototyping is a learning experience. Its value lies not in the code you produce, but in the lessons you learn.

Estimate to Avoid Surprises
Estimate before you start. You’ll spot potential problems up front.

Keep Knowledge in Plain Text
Plain text won’t become obsolete. It helps leverage your work and simplifies debugging and testing.

Use a Single Editor Well
The editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable.

Fix the Problem, Not the Blame
It doesn’t really matter whether the bug is your fault or someone else’s—it is still your problem, and it still needs to be fixed.

``select’’ Isn’t Broken
It is rare to find a bug in the OS or the compiler, or even a third-party product or library. The bug is most likely in the application.

Learn a Text Manipulation Language
You spend a large part of each day working with text. Why not have the computer do some of it for you?

You Can’t Write Perfect Software
Software can’t be perfect. Protect your code and users from the inevitable errors.

Crash Early
A dead program normally does a lot less damage than a crippled one.

Use Exceptions for Exceptional Problems
Exceptions can suffer from all the readability and maintainability problems of classic spaghetti code. Reserve exceptions for exceptional things.

Minimize Coupling Between Modules
Avoid coupling by writing ``shy’’ code and applying the Law of Demeter.

Put Abstractions in Code, Details in Metadata
Program for the general case, and put the specifics outside the compiled code base.

Design Using Services
Design in terms of services—independent, concurrent objects behind well-defined, consistent interfaces.

Separate Views from Models
Gain flexibility at low cost by designing your application in terms of models and views.

Don’t Program by Coincidence
Rely only on reliable things. Beware of accidental complexity, and don’t confuse a happy coincidence with a purposeful plan.

Test Your Estimates
Mathematical analysis of algorithms doesn’t tell you everything. Try timing your code in its target environment.

Design to Test
Start thinking about testing before you write a line of code.

Don’t Use Wizard Code You Don’t Understand
Wizards can generate reams of code. Make sure you understand all of it before you incorporate it into your project.

Work with a User to Think Like a User
It’s the best way to gain insight into how the system will really be used.

Use a Project Glossary
Create and maintain a single source of all the specific terms and vocabulary for a project.

Start When You’re Ready
You’ve been building experience all your life. Don’t ignore niggling doubts.

Don’t Be a Slave to Formal Methods
Don’t blindly adopt any technique without putting it into the context of your development practices and capabilities.

Organize Teams Around Functionality
Don’t separate designers from coders, testers from data modelers. Build teams the way you build code.

Test Early. Test Often. Test Automatically.
Tests that run with every build are much more effective than test plans that sit on a shelf.

Use Saboteurs to Test Your Testing
Introduce bugs on purpose in a separate copy of the source to verify that testing will catch them.

Find Bugs Once
Once a human tester finds a bug, it should be the last time a human tester finds that bug. Automatic tests should check for it from then on.

Build Documentation In, Don’t Bolt It On
Documentation created separately from code is less likely to be correct and up to date.

Sign Your Work
Craftsmen of an earlier age were proud to sign their work. You should be, too.

(Source: The Pragmatic Programmer: From Journeyman to Master)

Unity: 3D Game Development for iPhone


Unity is a multiplatform game development tool, designed from the start to ease creation. A fully integrated professional application that just happens to contain the most powerful engine this side of a million dollars.


Integrated Editor

Everything is done through Unity's simple user interface. Thousands of hours of thought and spit-polish have gone into it. Read more


Graphical Power

Unity has a highly optimized graphics pipeline for both DirectX and OpenGL.Read more



Asset Importing

All major file formats are supported, and almost any art application can be used with Unity. Read more


One-Click Deployment

Unity supports a wide range of platforms when you release your work to the come alive. Read more



Wii Publishing

The industry's most popular console just got a lot easier to develop for...Read more




iPhone Publishing

Revolutionary game development comes to a revolutionary device.Read more



Shaders

Unity's shader system combines ease of use, flexibility and performance.Read more



Terrains

Vast, densely foliaged landscapes that run smoothly on low-end hardware. Read more




Networking

Go from single-player to full realtime multiplayer games. Read more


Physics

Bring your interactions to life with the built-in Ageia PhysX™ physics engine. Read more



Audio & Video

Mix realtime 3D graphics with streamed audio and video. Read more


Scripting

Blazing fast .NET-based JavaScript and C#, with rich libraries and great documentation. Read more


Unity Asset Server

The Unity Asset Server is an add-on product which adds version control to Unity. Read more


Shadow & Light

Realtime soft-shadows and baked lightmaps, spiced up with halos and lens flares. Read more


Download 30 day unlimited trial version:

How To Make Money From iPhone Games

Last year, a small Mac game developer called Pangea Software ported one of its titles to Apple’s iPhone. Pangea’s Brian Greenstone didn’t expect to make much from the iPhone version of its arcade-style game Enigmo; he expected that the company might sell 10,000-20,000 units over its lifetime. It sold that amount in a single day, and from July 2008 to January 2009, it sold a total of 810,000 copies, earning a profit of $1.5 million, even after Apple took its 30 percent cut.

Numbers like that help explain the burst of iPhone game/entertainment news here at SXSW 2009, from location-aware fun apps to the Facebook Connect function linking iPhone apps to the social network. But there are also challenges. Those were analyzed at a Saturday SXSW panel featuring Greenstone and three other successful iPhone developers; here are my five favorite takeaways.

Think Handheld Game Console, Not Mobile Platform

Moderator Raven Zachary laid out the playing field: On the market, there are now 17.4 million iPhones and an estimated 9 million iPods (which also run the iPhone OS.) There are 27,000 iPhone apps that have been downloaded a half-billion times; 1 in 3 are games or entertainment apps. While it’s not the most popular phone on the market, it’s easily the most Net-centric, accounting for nearly 70 percent of all mobile-based web usage.

For those reasons and more, the panelists consistently described the iPhone less as a mobile platform than a handheld game console. Stephanie Morgan of ngmoco argued that it’s actually superior to Nintendo’s DS and Sony’s PSP, since the iPhone has better Net connectivity, and unlike either competitor, has finger touch, accelerometer, and location awareness functionality that can be integrated into gameplay. And since it’s also, you know, a phone, owners are more likely to have it on their person than a handheld console.

Keep Budgets Low By Sharing The Risk (And Wealth)

Notwithstanding blockbuster successes like Pangea’s Enigmo or ngmoco’s Rolando, most games get lost in the clutter of so many iPhone apps. Consequently, Greenstone expressed caution on development costs. “We don’t want to invest a lot of money, because we don’t know if we’ll make it back.” To keep budgets low, he doesn’t pay artists and other developers to help with porting Pangea’s games to the iPhone; instead he gives them a cut of the profits when the game sells.

Web 2.0 Marketing Is Key

The difficulty of distinguishing your game in a morass of 27,000 apps was a recurring theme. The panelists recommended building awareness through YouTube, social networks and other Web 2.0 channels. The big goal, they unanimously agreed, is getting your game in Apple’s top 100 apps. Once there, it gains self-sustaining momentum.

Play With Your Price Point

But how much should iPhone games cost? At first, Pangea tried selling titles for $10 each, but found itself in a price war against 99-cent apps. It now prices its games at $3-7 dollars, though Greenstone believes the average price point will trend back up to $10. Morgan said ngmoco is experimenting with introductory low prices, too; panelist Danielle Cassley of Aurora Feint (makers of an intriguing eponymous iPhone MMO) suggested lowering a game’s price to get it into the top 100, then beginning to increase the price. (Rumors that Apple will soon introduce a “Premium App” store, largely for iPhone games, could also help raise the acceptable price point.)

Don’t Worry About Piracy (Yet)

With software success comes piracy; an audience member asked if this was a concern with iPhone games. Pangea’s Greenstone said unauthorized downloads of its games did initially spike, but that it now represents about 5 percent of the total. Stephanie Morgan of ngmoco concurred, calling it a “negligible concern.”

During the audience Q&A, someone who introduced himself as a staffer with Nokia said he was interested in acquiring the rights to the panelists’ bestselling iPhone games, and converting them to their own mobile platform; though the Finnish company still dominates the handset market, none of the developers expressed much interest in the offer. The exchange struck me as an object lesson that Apple’s rivals could do well to learn from. If they have any hope of competing, they must not only contend with the iPhone itself, but the dedication of the app development community that’s sprung up around it.  (Source: Gigaom)