background preloader

OOP

Facebook Twitter

Download and Install · junit-team/junit Wiki. Become a Programmer, Motherfucker. If you don't know how to code, then you can learn even if you think you can't.

Become a Programmer, Motherfucker

Thousands of people have learned programming from these fine books: Learn Python The Hard Way Learn Ruby The Hard Way Learn Code The Hard Way I'm also working on a whole series of programming education books at learncodethehardway.org. Creating Exception Classes (The Java™ Tutorials > Essential Classes > Exceptions) When faced with choosing the type of exception to throw, you can either use one written by someone else — the Java platform provides a lot of exception classes you can use — or you can write one of your own.

Creating Exception Classes (The Java™ Tutorials > Essential Classes > Exceptions)

You should write your own exception classes if you answer yes to any of the following questions; otherwise, you can probably use someone else's. Do you need an exception type that isn't represented by those in the Java platform? Would it help users if they could differentiate your exceptions from those thrown by classes written by other vendors? Does your code throw more than one related exception? If you use someone else's exceptions, will users have access to those exceptions? An Example Suppose you are writing a linked list class. Virtual Method Tables.

One of the ingredients of the Concepts of Programming Languages course I teach at TU Delft, is an introduction to the C language.

Virtual Method Tables

In two lectures I went through the language, emphasizing functions, structs, pointers, and memory management based on Kernighan & Ritchie and a nice piece by Nick Parlante on Pointers and Memory. The students were supposed to be able to understand basics of expressions and control-flow from exposure to Java and Scala. For the lab assignment, William Cook had given me the idea of expressing dynamic dispatch in a procedural language as a method (no pun intended) to understand both the OO mechanism and appreciate the difference (and hard work) of memory management in C. The idea seemed simple enough, but while understanding the idea conceptually, I had never actually done the exercise myself. Searching the web did not result in a whole lot of information, but for this example.

(Thanks to pandoc for helping convert LaTeX to Markdown.) Implementing Vtable in C. How the Java virtual machine handles method invocation and return. This month's Under The Hood focuses on method invocation and return inside the Java virtual machine (JVM).

How the Java virtual machine handles method invocation and return

It describes the four ways Java (and native) methods can be invoked, gives a code sample that illustrates the four ways, and covers the relevant bytecodes. Method invocation The Java programming language provides two basic kinds of methods: instance methods and class (or static) methods. Best Practices. Creating a simple android app with 2 buttons. How do I build a very simple android app you ask?

Creating a simple android app with 2 buttons

It's easy, building a basic android application is not that hard. Making something really useful, cool and bug free, now that takes a good developer. This is a brief tutorial will show you how to code a very basic two button android application (with a start button and a stop button). You can use this code as an android project template or starting point for simple projects. Two Button Application Use Case A simple two button application, can be your starting point for various android projects. The AndroidManifest.xml File.

Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory.

The AndroidManifest.xml File

Practice and Learn - Google Code Jam. On this page you can see results and code from past rounds of Google Code Jam, and you can try the problems for yourself.

Practice and Learn - Google Code Jam

If you're new to Code Jam, try following the Quick-Start Guide. Where should I start? If you're new to programming contests, we highly recommend starting with the least difficult problems and moving up from there as you get more confident. DisplayObjectContainer - Adobe ActionScript® 3 (AS3 ) API Reference. The following code creates a display object container named container.

DisplayObjectContainer - Adobe ActionScript® 3 (AS3 ) API Reference

The next block of code uses a Loader object to load a JPEG file named "test.jpg" from a remote file server. Note that the checkPolicyFile property of the LoaderContext object used as a parameter in the load() method is set to false. Once the file is loaded, the code calls the loaded() method, which in turn calls container.areInaccessibleObjectsUnderPoint(), which returns a value of true because the loaded content is assumed to be from an inaccessible domain: Actionscript 3 - Listen to click event on overlapped sprites. Pong ~Part 5~ Collisions! « AS3 Game Tutorials. This is it.

Pong ~Part 5~ Collisions! « AS3 Game Tutorials

The tutorial you’ve all been waiting for. The tutorial that will bring everything together. The tutorial which will make you cry out in joy– OK, maybe not, I’m getting a little too excited… but seriously this is a good one. Collision Detection in Actionscript 3. In Actionscript 3.0 there are two methods to detect collisions which are: the hitTestObject and the hitTestPoint.

Collision Detection in Actionscript 3

Firstly, the hitTestObject detects whether two display objects have collided or overlapped. Org: AS3 Tutorials Part I (Understanding Movie Clips) - free Flash CS3 tutorial. Open Flash 9 and select a new Flash file (ActionScript 3.0) . Name it MovieClips and save it inside the FlasherAS3_PartI folder . In the Document Class box of the Properties panel , type MovieClips and then save the changes.

Cloud - Testdroid. Testing in scale Now you can test your app on hundreds of devices in minutes. Developers get instant feedback on the changes without a need for long test turnaround times. That will dramatically shorten your time-to-market and lower the cost of development without any manual testing work. Test your application - Make Me Droid, free online Android application builder. Test your application When your application is ready and generated, you have the following choices: Publish the application directly on the Android Market (Google Play), if you have signed it.Test the application on your Android phone, if you have one.Test the application on the simulator that we provide you.

The following chapters focus on using the simulator in a few easy steps: Simulator download.Launching the simulator from your PC.Connect to Make me Droid mobile website.Download and install your application. Alternatively, you can also use your own mobile phone to test your app. Performance - Slow Android emulator. Online Compiler & IDE for C, Java, C# and C++ JavaCompiler. How To Set Up ADB/USB Drivers for Android Devices (Updated 12/13/11.

So most people won’t have to use ADB (Android Debug Bridge) ever, but if you want to learn how or want to get a little more technical with your Android phone, here’s how to get it set up. I. Package Index. Getting Started with Flash Develop and AS3. Introduction: <div style="padding:15px; background-color:#EEEEEE; border:1px solid #C3C3C3; padding-top:0px"> I wanted to make a really easy to follow tutorial on how to get started using the Flash Develop and Actionscript 3.0. FlashDevelop, is a .NET open source editor for Flash and web developers.

I personally have recently switched to FD and am very impressed by the results, much faster workflow and project management. So this tutorial will to do things: quickly walk you through a typical FD installation and then how to compile your first application. Please note: Flash Develop is WINDOWS ONLY!