background preloader

How to Design Programs: An Introduction to Computing and Programming

How to Design Programs: An Introduction to Computing and Programming

Hallmarks of a Great Developer - Test Guide If you ask me, I'll tell you a great developer Plans before coding A great developer takes the time to plan an approach before designing or coding. A great developer knows that the time required to do so will be more than paid back by the time saved by getting it more right the first time. A great developer plans all scales of work, from envisioning multiple versions of a product to writing or modifying a small method. Always knows why A great developer always knows exactly why they wrote a particular line of code, and why they wrote it the way they did. Writes situation-appropriate code Any developer can write code. Deviates where and when necessary A great developer not only knows the canonical implementation but understands it is the canonical implementation. Knows when not to change code A great developer knows that changing code is sometimes worse than fixing it. Approaches debugging scientifically A great developer knows that debugging is a science not an art and approaches it as such.

Ambient Occlusion Fields Janne Kontkanen, Samuli Laine in ACM Siggraph 2005 Symposium on Interactive 3D Graphics and Games We present a novel real-time technique for computing inter-object ambient occlusion. For each occluding object, we precompute a field in the surrounding space that encodes an approximation of the occlusion caused by the object. This volumetric information is then used at run-time in a fragment program for quickly determining the shadow cast on the receiving objects. According to our results, both the computational and storage requirements are low enough for the technique to be directly applicable to computer games running on the current graphics hardware. Downloads Janne Kontkanen, 14.2.2005

25 Free Computer Science Books | Coderholic As a computer scientist I'm always looking to improve my knowledge of the subject. There are lots of great sources of information available online, but nothing really beats the depth of knowledge that you can find in a book. It is possible to get the best of both worlds though, as many books are now available online in full, and free of charge! Below is a selection of 25 of the best free computer science books that I've found online, with a brief description of each one. Become An X coder A guide to MacOSX development with Cocoa using Objective-C. The Cathedral and the Bazaar Eric Raymond's brilliant book about Open Source software, and its impact on software development projects. Data Structures and Algorithms with Object-Oriented Design Patterns in Java Also available in C#, Python, Perl, Ruby, Lua, C++ and PHP versions. Dive Into Accessibility Another Mark Pilgrim guide, on creating accessible websites. Getting Started with awk Awk is the perfect tool for many system admin tasks.

Test Driven Development and Design By Contract - friend or foe? in this post i’ll try to answer a legitimate question, relating to a comment due to my last statement that interfaces are poor contracts: why do we need contracts (in the sense of invariants, pre- and postconditions) when we’ve got unit tests right at hand, that could also test the stated conditions? in fact, it’s very tempting to see unit tests as an all-embracing instrument to check and show that a class will behave correctly, making contracts kind of unnecessary. i’ll try to show you that unit tests (as an instrument for test driven development) and contracts (as an instrument for Design By Contract) indeed share the same goals but aren’t competing techniques, rather than methods that could complement each other. it’s not about verification – it’s about specification that said, both methods share the same main incitement – the specification of a system that will drive its design. don’t bear away collaboration includes clients and supplier reliance on a proper context clear Design reuse

Programming from the Ground Up 30 game scripts you can write in PHP, Part 1: Creating 10 fundamental scripts Getting started As both a game master/storyteller and a developer, I frequently find myself writing little utilities and scripts to help me when running, planning, and playing games. Sometimes I need a quick idea. Other times, I just need a whole pile of names for Non-Player Characters (NPCs). This article will explore 10 fundamental scripts that can be used in various types of games. We will blaze through these scripts pretty quickly. Back to top A basic die roller Many games and game systems need dice. In many cases, that would be more or less fine. Listing 1. function roll () { return mt_rand(1,6); } echo roll(); Then we can pass the type of die we want to roll as a parameter to the function. Listing 2. function roll ($sides) { return mt_rand(1,$sides); } echo roll(6); // roll a six-sided die echo roll(10); // roll a ten-sided die echo roll(20); // roll a twenty-sided die Random name generator Listing 3. Listing 4. Listing 5. Scenario generator Listing 6. Deck builder and shuffler Mad Libber

Regular Expression Matching Can Be Simple And Fast Russ Coxrsc@swtch.com January 2007 Introduction This is a tale of two approaches to regular expression matching. One of them is in widespread use in the standard interpreters for many languages, including Perl. The other is used only in a few places, notably most implementations of awk and grep. The two approaches have wildly different performance characteristics: Let's use superscripts to denote string repetition, so that a? Notice that Perl requires over sixty seconds to match a 29-character string. It may be hard to believe the graphs: perhaps you've used Perl, and it never seemed like regular expression matching was particularly slow. Historically, regular expressions are one of computer science's shining examples of how using good theory leads to good programs. Today, regular expressions have also become a shining example of how ignoring good theory leads to bad programs. Regular Expressions Regular expressions are a notation for describing sets of character strings. Finite Automata

Software Architecture Document Guidelines Update, 27th October 2009: Please see Software architecture document guidelines for an updated version of the guidelines. Regardless of the development process that you use, a description of the software architecture can be essential for any project, big or small. If software architecture is about the structure of a system and is the vehicle for satisfying the requirements, then the software architecture document is a written description of this. An outline description of the software architecture, including major software components and their interactions.A common understanding of the architectural principles used during design and implementation.A description of the hardware and software platforms on which the system is built and deployed.Explicit justification of how the architecture meets the non-functional requirements. It's worth remembering that the software architecture doesn't have to be a huge weighty tome and it doesn't even need to be a traditional Word document.

Department of English Languages and Literature - Courses This is a collection of ideas from various authors gathered together by Professor John Lye for the use of his students. This document is copyright John Lye 1996, but may be freely used for non-proft purposes. If you have any suggestions for improvement, please mail me. I.General Principles 1. 2. 3. 4. 5. 6. 7. The term 'subject' foregrounds the relationship between ethnology, psychoanalysis, and semiotics. The value of the conception is that it allows us to 'open up', conceptually, the inner world of humans, to see the relation of human experience to cultural experience, to talk cogently of meaning as something that is structured into our 'selves'. There is no attempt here to challenge the meaningfulness of persons; there is an attempt to dethrone the ideology of the ego, the idea that the self is an eternal, indivisible essence, and an attempt to redefine what it is to be a person. 8. 9. 10. II. 1. 2. 3. 4. 5. III. 1. 2. require certain conventions of reading. 3. 4. 5. 6. 7. 8. 9. 10.

Amit’s Game Programming Information What’s on this page? I’m interested in producing complexity out of simple parts. This page contains bookmarks that I collected while working on games; I did not write most of the content linked from here. As a result the set of links here reflects the types of things I needed to know: only a few specific topics (not everything related to game programming), general ideas instead of platform-specific information (graphics, sound, compilers), and ideas and designs instead of source code (I find it easier to go from an idea to code than from code to an idea). Determining how to move around on a map is an interesting problem. These pages are about specific techniques for pathfinding and object movement: My current favorite algorithm is A*, because it can handle varying terrain costs well, and it seems to be faster than most graph searching algorithms. Code and Demos Many times I play a game and wish that the computer opponents were written better. What techniques are useful in game AI? Notices

guide-things-you-shouldnt-be-doing-in-rails edit Posted by kev Wed, 30 Aug 2006 05:32:00 GMT Koz recently checked code into core that kicks and screams all the way home if you’re using deprecated methods or instance variables. In honor of this I’ve decided to give you a list of things I still see over and over in Rails code that you really shouldn’t be doing anymore. Update: There’s been enough controversy over this article that I’ve responded. Accessing Instance Variables You Didn’t Create It’s time to stop using the instance variables for params, flash, session, request, response and all of their formerly preceded by an @ friends. rabble (who you’ll hear more from later) also suggests that you not intermix usages of flash[:notice] with flash['notice'] and the like. Using Deprecated Finders find_all and find_first have been deprecated over a year now. Getting Ahead of Yourself Stop trying to write “neato ajax driven thingies” before you understand how to write it properly without ajax. Fallin’ off the wagon Using Components See?

Again Abstract class vs Interface... Again Abstract class vs Interface...While pairing with a fellow thoughtworker ( we ended up discussing Abstract class vs Interface and he found this explanation useful. A Class (abstract or not) defines a type while an interface does not. In my domain anything that can be drawn is a shape(including a point) and thus behaviour defines a type. abstract class Shape{ public abstract draw();} In another domain which includes a Robots, Humans and Pets,If I need to treat all objects that can walk similarly, I would like to have an abstract handle to of all the above and that ends up in a interface Walkable{ void walk();} ...Robot implements Walkable{...}...Human implements Walkable{...}...Pet implements Walkable{...} and merely something that can walk does not define a type here.

Related: