Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Felix Ungman

Member Since 19 Nov 2007
Offline Last Active Today, 01:08 PM
-----

Posts I've Made

In Topic: Massive memory leak

16 May 2013 - 05:28 AM

There's only one way to deal with leaks: Find them and fix them.

 

Leaks don't necessarily come from new/malloc statements in your own code, they could also happen indirectly if you don't call the proper cleanup methods in library code.

 

There are two methods to find leaks:

- Use a static analyzer that examines logical errors in your code.

- Run the executable using a memory profiler and watch for unreleased resources.

 

With good tools tiny leaks should be as easy to detect as massive ones.


In Topic: Strong and Weak AI

07 May 2013 - 12:15 AM

Informally I think you could describe the difference like this:

- the weak AI can figure out what the solutions are to a specific problem

- the strong AI can figure out what the problems are in a given general situation, and then solve them

 

In the context of games you have http://en.wikipedia.org/wiki/General_game_playing algorithms, that would be able to play *any* game, as opposed to a specific game.


In Topic: Writing good code based on good architecture

29 April 2013 - 06:30 AM

I think Clean Code is the book you are looking for.


In Topic: Science Fiction Book Recommendations

23 April 2013 - 12:29 AM

I've been badly disappointed with my recent book choices lately (most recently, I really thought that The Diamond Age would be almost as good as Snow Crash...), and so rather than take another stab at it myself I'm reaching out for suggestions.

 

Agreed, I thought Diamond Age was OK but it hasn't aged very well. But if you want to try something different by Neal Stephenson I highly recommend Anathem. At first I was just scratching my head but once I got past the first few chapters I couldn't stop reading. Definitively the best book I read last year.


In Topic: Coding Style: Curly Braces

18 April 2013 - 01:58 AM

(we all want to read code that looks exactly like our style I'm sure). 

 

Well, my approach is something like this:

1 - practice reading code in a lot of different styles and get comfortable with doing it

2 - practice *writing* code in a lot of different sales and get comfortable with doing it

3 - get to know and use the formatting tools of your IDE

4 - be consistent and follow style of the code that you are working with

 

Consistency is far more important that the particular style.

 

What style do you tend to use and like better?  What are you reasons you chose that specific style for curly braces?

 

The primary formatting tool is whitespace, and I personally prefer lots of whitespace and large monitors to compact code so curlys usually get the line to themselves.


PARTNERS