Bye, Bye, Pyro Studios

September 11, 2007 @ 22:15 | In Personal | 6 Comments | del.icio.us digg devbump rss

Last Friday was my last day working at Pyro Studios. The decision was taken months ago but due to diverse circumstances I still continued working at Pyro for several months. As you probably know, I was working in the Technology Team which I led during a short period of time. It has been half and a year working at Pyro Studios where I have learned a lot and met lot of great professionals and good friends. I expect to work with all of them in the future. Anyway the objectives and philosophy of the studio were different from mine so the split was needed. :)

I think that time for building my own future has come. I have lot of ideas where I want to start working on and I have some money saved. So I think I will probably try the invest. At the moment, I cannot tell more about that. Expect news very soon.



CLR via C#, Second Edition

August 12, 2007 @ 15:28 | In Books, Programming | 2 Comments | del.icio.us digg devbump rss
CLRviaCsharp

CLR via C#
Author: Jeffrey Richter
Pages: 693
Published: 2006

I learned all the internal details about NT reading Advanced Windows (whose last edition was titled Programming Applications for Microsoft Windows) by Jeffrey Richter, co-founder of Wintellect. I like how he writes his books. He is able to cover a broad range of topics without being too dense when presenting them and with the right balance between technical text and examples. I have been programming C# (mostly in my spare time) since Microsoft released it. But until this time, I didn’t have time enough to study the language and all the infrastructure thoroughly. And when I discovered this book, I knew that it was time to master .NET and C#.

CLR via C# is a book dedicated to CLR. It is not a book about C#. C# is the language used for all the samples in the book. The author makes emphasis in how the implementation of C# is layered above .NET. Whenever there is an important detail in the interaction between C# and .NET it is described by the author. And although the book is published by Microsoft, Richter holds a critical role with all the aspects that are presented about .NET noting where things can be improved, where Microsoft is working for the next version and why certain decisions were chosen.

The book is divided into five parts:

  • CLR Basics: About internal details of the CLR’s Execution Model and what assemblies are and how they are deployed.
  • Working with Types: Information about type fundamentals, namespaces, castings, boxing and type operators.
  • Designing Types: Dedicated to methods, properties and events.
  • Essential Types: About strings, enumerated, arrays, interfaces, delegates and generics.
  • CLR Facilities: This is, in my opinion, the more interesting part of the book: Exceptions, Garbage Collection, CLR Hosting, Reflection, Asynchronous Operations and Threads Synchronization. I really liked the chapter about Exceptions. It is especially well written.

As all the books written by Jeffery Richter, I recommend this book. If you are going to fight with the .NET Framework this book is a must have in your bookshelf.

Rating: 8 / 10



Building a NAS

July 9, 2007 @ 3:22 | In Hardware, Linux | 4 Comments | del.icio.us digg devbump rss

I have been building a NAS in my spare time for the last months. I wanted this machine for backing up my other machines, storing movies and TV series for my media center, storing recordings from the TV, etc etc. I could have bought a specific machine for this purpose, but I found more interesting and funny building it on my own. These were the objectives I had in mind when designing the machine:

  • A 24/7 machine (running all the day)
  • Small
  • Quiet
  • Low power consumption
  • Easily expandable with new disks without losing data
  • RAID 5
  • Break the TB barrier
  • Being able to transfer saturating the Gigabit ethernet port
  • With a customized Linux OS

And well, I think that I have been able to get all my objectives. This is my first modding, so I encountered lot of problems. Sure the next time I will do it better.

The following sections are a worklog of how I made this machine. Enjoy it.

Click to read the full article



See you in Gamelab^Oviedo!

June 26, 2007 @ 2:14 | In Programming, Videogames | 13 Comments | del.icio.us digg devbump rss
Gamelab

I am giving a presentation about Technology in VideoGames in the Gamelab 2007 Conference that is being held in Oviedo / Spain this year. My idea is to give a general overview of the current challenges real time developers have to face when developing a videogame. Is is not intended to be a deeply technical presentation.

I am proud that events like these are held in Spain. We need them to promote the industry. And undoubtly, this is going to be a high quality event (reading the name of the rest of the lecturers).

See you there gambiteros!

Update:as promised, here is the link to the power point presentation: Retos tecnológicos en Videojuegos. Be patient with the download speed :)



Back-of-the-envelope

April 19, 2007 @ 0:00 | In Programming | 2 Comments | del.icio.us digg devbump rss
Estimating picture

There is a technique not widely known in computing engineering that is very useful to estimate calculations: back-of the-envelope calculations. Being able to estimate properly is crucial for software engineers. Of course, there is a lot you can learn by the experience. But this skill can be improved with training.

Back-of-the-envelope calculations estimate based on rough approximations than can be derived from common sense. The back-of-the-envelope term comes from the idea that those calculations are so simple that you can write them down in the back of an envelope. Obviously you don’t have to use an envelope at all for this technique.

You need a question whose answer doesn’t have a practical way to be exactly calculated. For example, how long would it take you to fill a floppy disk by typing? A floppy disk contains 1.44 megabytes. Estimating that you can type at a rate of 50 words per minute (300 bytes), you write 1 kb in 3 minutes, 1Mb in 3000 minutes and 1.44 in 4500 minutes or 75 hours. :)

As you can see, you round your calculations to easy numbers in the same order of magnitude. Extrapolating knowledge is useful too. If you like to read more about this, I recommend the book Programming Pearls by Jon Bentley. It is online, and the chapter about this can be found here.

Apart from obvious rules, there are more interesting ones. For example, Jon Bentley describes the Little’s Law in his book: “The average number of things in the system is the product of the average rate at which things leave the system and the average time each one spend in the system”.

An example using the Little’s Law to estimate your city’s death rate, measured in percent of population per year: if the life expectancy is 70 years (1 person = 70 (average rate) * death rate) then death rate is 1/70 or 1.4% of the population each year.

And now, more interesting questions (without answers…): How much time does your team spend waiting for the compiler to finish its work? How much money does your studio lose due to that? How much time will take that new feature? When will the game be ready for production? ;)

Want to evaluate your proficiency estimating things? Try this quiz. I got only a poor 5. Probably, I need to improve my estimation skill. What did you get?



Test-Driven Development by Example

March 13, 2007 @ 3:17 | In Books, Programming | No Comments | del.icio.us digg devbump rss
Test Driven Development book

Test-Driven Development by Example
Author: Kent Beck
Pages: 220
Published: 2003

Test-Driven Development is part of the Extreme Programming movement, created by Kent Beck (author of the book), Ward Cunningham and Ron Jeffries. It is an iterative technique to develop software where you only code the things that are strictly necessary.

If you want a new feature in your code you write a test using that feature and later you write the new code that makes that test work properly. You write new code only if an automated test has failed. And iteratively you continue until you finish all the requisites. Between test and test you always have a code that compiles and works.

This is described by Kent Beck as the Red/Green/Refactor rule:

  • Red - Write a little test that doesn’t work, and perhaps doesn’t ever compile at first
  • Green - Make the test work quickly, committing whatever seems necessary in the process
  • Refactor - Eliminate all of the duplication created in merely getting the test to work

The book itself is written using this philosophy. With small steps the first part of the book teachs you the technique with a very simple example. The second part describes a more complicated example and introduces a framework for writing tests. Third part is dedicated to patterns for Test-Driven Development.

Part two and three of the book were boring to me but I really enjoyed the first part of the book. It is an example very well written and very easy to read that demonstrates you the heart of the technique. I like the incremental approach of writing source code that always compiles (something that I have been using for years) against the opposite technique: writing tons of code at first and later spending hours (even days) making it to compile.

Although you probably won’t be able to put into real practice the entire philosophy (I’d like to see a real project 100% Test-Driven Developed) you can learn very valuable things from this book: tests are useful and simplicity is your friend.

Rating: 8 / 10



Fast File Loading / part II - Load-In-Place

February 21, 2007 @ 0:15 | In Programming | 18 Comments | del.icio.us digg devbump rss

In my first article on Fast File Loading, I described techniques directly related with the hardware and the Operating System to load files in the most efficient way. In this one, a technique for organizing the data to be loaded as fast as possible is described. Basically, we are going to load data without doing any parsing at all. Although the techniques described here are oriented towards realtime applications, any application could use them to accelerate its load times.

The implementation and all the samples shown here can be found in a project that you can download. It is a project for Microsoft Visual Studio 8.0 and it has been tested under a 32-bit architecture. Extensions to other compilers and other architectures should be easy to add. This code must be taken as a proof of concept and not as a solid and robust implementation ready to be used in a project. I have tried to isolate the dependencies with other systems so that you can concentrate in the topic of this article.

Click to read the full article



Blog Refinements

February 20, 2007 @ 3:39 | In Personal | 2 Comments | del.icio.us digg devbump rss

I have been doing some improvements to my blog. Most of them are internal ones (like upgrading WordPress, updating admin plugins, improving the CSS compatibility, etc) and others are visible ones, like the new About image, the link to my LinkedIn profile and the Blogroll with the blogs I have in my Bloglines account.

By the way, I discovered FeedBurner and started to use it to manage the feeds from this blog. All the requests are redirected now to FeedBurner. You don’t have to change anything to continue reading the feeds. May be some old articles appears as new in your feedreader, but that should be temporal. I have changed the information that appeared in the feeds; now you get only a brief summary of the post and if you want to read it entirely you have to click and visit the page (there is a open debate in internet about this: Full Text vs. Summary Feeds. Well, I changed my politic, but I could return to the full text in the future. I am only experimenting).

And that is all. Tomorrow I promise a more interesting entry. ;)

PD: Thanks, to my bro for creating the caricature. He is the creator of the great comic site TiNoMi.



Exceptional C++ Style

November 30, 2006 @ 3:35 | In Books, Programming | 3 Comments | del.icio.us digg devbump rss
Exceptional C++ Style

Exceptional C++ Style
Author: Herb Sutter
Pages: 325
Published: 2005

I have been programming C++ for more than 15 years following the evolution of one of the more mature languages still in use today. There have been lot of changes since the beginning, and more of them are to come. Yes, may be it is time for change to other more modern language but I still enjoy learning new things about C++. And if those things are taught by Herb Sutter the reading becomes almost obligatory.

Exceptional C++ Style continues where Exceptional C++ and More Exceptional C++ left off. With the same philosophy than the previous books (topics classified by category and with a associated difficulty rating) the author cover topics previously described in other publications: C/C++ User Journal, Dr. Dobb’s Journal, Guru of the Week, etc.

The book is divided into seven parts: Generic Programming and the C++ Standard Library, Exception Safety Issues and Techniques, Class Design - Inheritance and Polymorphism, Memory and Resource Management, Optimization and Efficiency, Traps - Pitfalls and Puzzlers (really funny) and Style Case Studies (where the author himself dissects real-world published code finishing with a depth analysis of std::string and why its monolith design was really a bad decision)

I really enjoyed the book while learning more things about the language: why you should overload template functions instead of specialize, the current status of the export keyword, what the distinct levels of exception safety are, what the Nonvirtual Interface pattern is, why you should make destructors for a base class public virtual or protected nonvirtual, a precise description of the implications of the inline keyword, etc, etc…

In conclusion, if C++ is your main programming language and you really like it, you should read this book.

Rating: 8 / 10



Fast File Loading

October 25, 2006 @ 0:41 | In Programming | 17 Comments | del.icio.us digg devbump rss

Reading data efficiently from Hard Disk and DVD units is vital for video games and one of the more important problems to solve in the next generation of games. While we are getting 20x performance in processing power and memory size, we are only getting 4x performance improvement in data devices (dvd for consoles).

I describe in this post how to efficiently read raw data from disk (hdd, dvd) oriented towards streaming files in a realtime application (although the concepts are useful in other areas). The platform used is Win32, but all the topics covered could be easily ported to other platforms.

Click to read the full article



Fri, 25 Jul 2008 11:40:15 +0200 / 21 queries. 2.061 seconds / 2 Users Online

gentoo link wordpress link apache link PHP link website stats

Theme modified from Pool theme. Valid XHTML and CSS