We will pick a challenge each week and showcase it on FaceBook, Twitter, our Newsletter, and the homepage where everyone can see it!

The idea of a "challenge" is to introduce someone who has never used a language/technology without scaring them or overwhelming them. This means easy to understand, open ended challenges that encourage people to do a little research, learn a bit, and try it on their own.

Here's the format you can submit your challenges in:

Quote

CHALLENGE TITLE (Example: jQuery Effects)

IMAGE (An image representing your language/technology)

CHALLENGE: A short description of the challenge (Example: Try out jQuery by using one or more of the jQuery Effects)

INTRODUCE THE LANGUAGE/TECHNOLOGY: This is your sales pitch, tell people what the language/technology is, why they should try the challenge, and a few examples of how you have used the language/technology.

IDEAS:

Bulleted List

Of Ideas

For Your Challenge

Example:

Slide Show

Image Gallery

etc.

RESOURCES:
This is where you link to tutorials, documentation, downloads for compilers/APIs/libraries, etc. Make this as complete a resource list as possible for a BEGINNER

If there is a forum, tutorials, or code snippets for your language/technology on Dream.In.Code, link to them as well.

HOW TO GET STARTED:
This should be a crash course tutorial on how to get started. Installing any software. Setting up a hello world. Whatever you have to do, or link them to to get them started. Remember, keep the barrier to entry low, you don't want to scare people away from your favorite language!

Replies To: Submit A Challenge

Re: Submit A Challenge

Posted 06 January 2010 - 02:41 PM

Python Version Jump

CHALLENGE: Write a python program that runs in both 2.6 and 3.x syntaxs (or a program written in both syntaxs). The differences are smaller than when 3.0 was released, but you will still need to think about the problem. The biggest change you'll find is how python handles IO, so that will be the most challenging.

INTRODUCE THE LANGUAGE/TECHNOLOGY: If you have not used python before the first thing you'll notice about it's syntax is a lack of character-blocks, and instead uses whitespace to define blocks, so two lines in the same indentation level is in the same block. Once your use to using whitespace to define blocks, you'll love the clarity of the language. Python 3.x emerged just over a year ago, and introduced some new ideas. Being that it is a new language provides a challenge about thinking how to use the standard library. Even without a massive amount of third party libraries that python 2.x has, the 3.x line is still extremely powerful, and may even introduce you to a new way of writing.

IDEAS:
* A number guessing game
* Printing out dice
* Name generator
* A file handler that does something useful (such as remove exectable properties on all files in the parent directory and below)

* Any program that uses basic IO will do, of course length will make it more challenging. I also suggest doing something that requires a module fromt the standard library.

RESOURCES:
This is one of the cool things about python, documentation is built in ! Many languages have the ability to strip out commenting documentation, but most host it on a website. With python this is done right inside your own installation, simply use pydoc to access it. Pydoc provides a couple of interfaces, the help() function in the interpreter, pydoc by itself on the command line, and a server interface, which can be started by running pydoc -p 8080 and navigating to http://localhost:8080 in your web browser. Doing this allows you to browse the entire library installed on your system, very nifty. (note that for python3 you'll need to call pydoc3)

HOW TO GET STARTED:
Installing python on windows is no harder than installing any other peice of software, go to http://python.org/download/ and get the appropiate package. On linux it's likely already included, but python3 will need to be installed explicitly, most distros have a package named "python3", so go ahead and grab that (source is always available if you run an odd-ball distro). If you need help, just ask google.

Re: Submit A Challenge

Posted 06 January 2010 - 02:47 PM

code_m, Nice work on the challenge!! Might I suggest simplifying it a bit more to just writing something in Python. For someone like myself who has never used python, I didn't even know there were different versions, but have always wanted to at least give it a shot. Maybe rather than trying different versions, just a basic challenge to try python in general with something a little more advanced thrown in for those that have already used it (like a neat function or way of doing things in python that make python special)

Re: Submit A Challenge

Posted 06 January 2010 - 04:35 PM

TWITTER API APPLIED

CHALLENGE: Try working with the Twitter API to build an application that simplifies a specific task of your own.

INTRODUCE THE LANGUAGE/TECHNOLOGY: Twitter grows as a service exponentially, so does the number of applications that are using Twitter to achieve various goals. Countless Twitter clients, web applications that post tweets from blogs and whatnot. I've been working extensively with the Twitter API for a few months and I can say that it is not that hard as it seems, if you dive into it. I've released two projects of mine, that are using the Twitter API as their foundation (dotTweet - a Twitter API wrapper for .NET and PerformanceTweet - an application that sends computer performance reports via Twitter).

IDEAS:

An application that reads a specific RSS feed and posts links to articles found there on Twitter

An application that informs others about the weather in your city

An application that automatically retweets posts with a specific hashtag

An application that searches for tweets containing a specific phrase

RESOURCES:
There are more resources for Twitter API developers than you think. Even here on DIC, we do have some interesting code snippets and tutorials. When you start, it is a good idea to look at the official Twitter API documentation. In this way, you will get yourself familiar with what the Twitter API can do and how it is implemented.

If you are interested in using Twitter with OAuth in PHP, definitely check out this topic.

If you don't feel like writing every single Twitter API call from scratch (not me), take a look at TweetSharp, which is another good Twitter API wrapper for .NET developers. Sometimes it is also good to check out the Twitter Development Talk group as the primary source of Twitter API updates and implementation samples.

HOW TO GET STARTED:
Basically all you need to get started you already have. An IDE (or text editor) for your language of choice is going to be enough. You will need some knowledge about what XML, ATOM and JSON are. Although you don't need to be an expert in these, it will speed up your work a bit if you will know the fundamentals. You will also need some experience working with HTTP requests. The rest of the Twitter API is mainly about correctly building these request and processing the responses accordingly.

Re: Submit A Challenge

Challenge
Learn to use one or more of the Qt APIs to create a simple application. (Qt is currently on version 4.6)

Graphics

OpenGL

Scripting

XML

Unit Testing

Networking

Database

WebKit

Multimedia

And more!

Introduce the language/technology
"Qt is a cross-platform application and UI framework. Using Qt, you can write web-enabled applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code." Qt is fairly easy to learn, and easy to maintain. It is a great UI API for C++. You can write the code on one OS, compile it, run it, then compile the same code on a different OS without changing anything, and get the same application. Many popular programs use Qt - VLC, GoogleEarth, The KDE Environment, and Skype.

Ideas

Spreadsheet

Graphical Tic-Tac-Toe game (or similar game)

File Browser

Database reader/editor

Music player

With Qts extensive APIs, you can make just about any kind of application that you want!

Resources
The Qt Designer download comes with a built-in help utility, that has a complete documentation available offline.
The Qt Examples page has many examples that go more in depth with Qts functionality. If you haven't used Qt before, take a look at the Qt Tutorials page.

How to get Started
Getting started with Qt may seem a bit complicated. One you write your first couple applications, you start to see a pattern. I'm going to describe the process for making a GUI.

Qt uses C++'s main function, unlike the WIN32 API. But, Qt uses a "QApplication" object within the main function to define the application. (The Qt Classes all start with a capital "Q" to designate their relationship with Qt.) Look at this example:

#include <QtGui> // The Library that contains ALL of the classes that are used to make GUIs
int main(int argc, char **argv){
QApplication app(argc, argv); // Pass the QApplication the command line args
/* Graphical "Widgets" go here */
return app.exec();
}

Widgets are the components that make up a GUI. Example: A label is a widget, a text field is a widget, the WINDOW is a widget (get the picture? ). When making a GUI application, most of the time your widgets will be in "QMainWindow". While this is the standard Window with a menubar, statusbar, and a central widget, any widget can act as a window, however. See the following:

#include <QtGui> // The Library that contains ALL of the classes that are used to make GUIs
int main(int argc, char **argv){
QApplication app(argc, argv); // Pass the QApplication the command line args
QMainWindow *window = new QMainWindow(); // Create a QMainWindow
window->show(); // Make the window visible
return app.exec();
}

#include <QtGui> // The Library that contains ALL of the classes that are used to make GUIs
int main(int argc, char **argv){
QApplication app(argc, argv); // Pass the QApplication the command line args
QLabel *hello = new QLabel("Hello World!"); // Create a QLabel with text "Hello World!"
hello->show(); // Make the window visible
return app.exec();
}

You'll notice that the spinbox is in its own window, as is the mainwindow. Okay, that's it for my tutorial, check out the official Qt Tutorials here. They offer a better, less rushed tutorial, that is much more detailed.

Re: Submit A Challenge

Posted 06 January 2010 - 08:39 PM

Explore Vala!

CHALLENGE:
Try out Vala by making a simple app of any kind.

INTRODUCE THE LANGUAGE/TECHNOLOGY: Vala is a relatively new programming language (currently 0.7.9) that is designed as a wrapper for C and GLib/other GNOME Technology . It has support for OOP, generic programming, and assisted memory management. They language is very easy to read and write, and even 'noobs' could be writing programs in no time at all. Vala is also unique in the fact that is borrows much of it's syntax from both C#/Java as well as C++. This gives the language the ability to make developing easier/faster, without giving up any power.

HOW TO GET STARTED:
I'm currently working on a tutorial for the Vala language that I plan to submit here on D.I.C. later on. Here is the first lesson (greatly shortened). It explains setting up Vala, and compiling a Hello World program.

iphoneorange, on 8 Dec, 2009 - 10:08 PM, said:

Setting Up The Development Envionrment

Setting Up The Vala CompilerIf you already have valac installed, you can skip this section

*Five Minutes Later....*
Ok, now that you got it on your hard drive, we're ready to install. Go ahead and run the .EXE. The process for Windows 7 (and most other versions of Windows I assume) is as such:
- Select Language
- Next to start
- The license, accept it
- It will ask you what you want to install. Select what you want and continue.
- Choose the destination folder and click install
- You're done

To make sure is really worked, open a terminal and type 'valac'. As long as it doesn't say that the command wasn't found, you're good to go.

Re: Submit A Challenge

Posted 07 January 2010 - 10:17 AM

Intro to Being a Purely Procedural Schemer

CHALLENGE:
Try and create a few functions in Scheme, especially recursive ones

INTRODUCTION: Scheme is a lightweight, fast, and powerful language. Prepare to get your car and cdr on! One of the features is it is programmed recursively, which will truly allow you make some very creative programs. On the other hand if you are weak with recursion and its concepts it will force you to become better at it, and will only benefit from it.

HOW TO GET STARTED:
The official site for DrScheme has a very good getting started page: http://docs.plt-scheme.org/quick/
I suggest setting your language to: R5RS, its a pretty standard one
Just remember you can work right from the pompt, or you can save a .scm file and run your program from there. Try and build a library of functions to use!

Quick Start at what Hello World looks like:

;Your first program
(begin
(display "Hello, World!")
(newline)
)

Next Step is mastering the 3 C's; car cdr and cons. Take a look what happens, what is saved? how is it displayed?

Re: Submit A Challenge

Posted 07 January 2010 - 10:52 AM

skyhawk133, on 6 Jan, 2010 - 03:47 PM, said:

code_m, Nice work on the challenge!! Might I suggest simplifying it a bit more to just writing something in Python. For someone like myself who has never used python, I didn't even know there were different versions, but have always wanted to at least give it a shot. Maybe rather than trying different versions, just a basic challenge to try python in general with something a little more advanced thrown in for those that have already used it (like a neat function or way of doing things in python that make python special)

Seems to me you already had planned a python week, so The Version Jump challenge might be good for a week or two after that challenge.

If you want I'll write up another python challenge, the way your suggesting, I just really love the language.

Re: Submit A Challenge

Posted 07 January 2010 - 11:04 AM

I think a good challenge would be to build a custom GUI using Swing. For an added bonus, experienced Java developers could play around with one or more layouts (GridLayout, GridBagLayout, BoxLayout, CardLayout, etc.).

Re: Submit A Challenge

CHALLENGE: Write a desktop calculator in Haskell. It's a scalable application that you can take as far as you like. If you want, you can add variables, and by the time you've added tail recursion, you're turing complete. You can go simple, and just write a simple command-line calculator that does as much as you want it to do. You don't need to learn much of Haskell to write this. If you don't want to write a calculator, you're welcome to write something else. Just Have Fun 

BONUS: If you already know Haskell, and find this a bit boring, you can skip this challenge and write your own monad. Fun stuff.

INTRODUCE THE LANGUAGE/TECHNOLOGY: It is hard to really introduce Haskell in few words. Haskell is a compiled, advanced purely functional programming language that has been around for over 20 years. Haskell is of the most popular functional programming languages. In Haskell, there are no side effects. There is no 'lets modify that global variable!'. There is no global state. Haskell is pure, and does I/O via the IO monad, which you will learn about fairly early. You don't even have to understand or know what Monads are to use the IO monad, and you can do this challenge with no knowledge of monads. Haskell is strongly and statically type, and the type system actually helps you, rather than gets in your way. Because Haskell is pure, and due to the power of it's type system, it makes it easy to write large, complex, and stable code. It's impossible for there to be a type error in your code at runtime. Code written in Haskell is more likely to work correctly if it compiles than in other languages.

Haskell isn't as hard as people make it out to be. When people say that you have to forget OOP and such to learn Haskell, they mean that you cannot try to learn Haskell and assume that OOP is the only way to do things, or try to write OOP code in Haskell. Haskell is easy to learn if you open your mind, and take yourself back to the beginning. The time before you knew other languages. Your previous knowledge will help you, and as long as your OOP assumptions are left behind, it will not hinder you. Haskell is amazingly fun, and one of the most elegant languages you will ever code in. There are a lot of cool things in Haskell that will blow your mind. Even if you don't decide to use Haskell for personal projects or anything more than this challenge, just writing a little code in Haskell will benefit you. I think once you've used Haskell, you'll want to know more. More sexiness can be found here: http://haskell.org/h...ki/Introduction

IDEAS:

One you become more familiar with Haskell, turn your calculator into a turing complete language.

Add a GUI to your calculator using WxHaskell or gtk2hs (and Glade, the GUI builder if you like that sort of thing).

If a calculator doesn't appeal to you, write something else! Anything else! Just have fun!

RESOURCES:
My resource thread should definitely come in handy here: http://www.dreaminco...topic144577.htm
I especially recommend that you read through LYAH (Learn You A Haskell) if you're new to the language, and then if you want more, you can start reading Real World Haskell. You can find links to all of this and more in the thread I linked. There is a Functional Programming forum that Skyhawk created partially at my suggestion during my first few days on this site. It's one of the reasons I like this site so much. It's here: http://www.dreaminco...topic144577.htm. I and a couple other people answer questions in there, though I'm probably the most frequent. If you have any questions, you can ask them there. There are also a few snippets in the Other Language snippet section, but I doubt it's enough to help anybody.

HOW TO GET STARTED:
You're going to want to get Haskell via the Haskell Platform, a standard Haskell distribution for all systems. It comes with useful libraries, and stuff you need to install Haskell libraries from Cabal and such. Not to mention, the flagship Haskell compiler, GHC. It's insanely simple to install regardless of what system you use. There is even a Windows installer. You can find the link to the Haskell Platform to the resource thread I linked in resources.

After you've installed Haskell, you'll probably want to use Emacs or Vim to code in it. Of course, you can use any text editor, but you wont get the most out of Haskell unless you use Emacs or Vim. There is also an IDE for Haskell written in Haskell called Leksah. I hear it's pretty good at this stage. There is a bit of information about various editors, including relevant links in the resource thread.

Once you've installed Haskell, you can fire up a terminal and type 'ghci' to get the Haskell 'REPL' running. This is probably the most useful thing you will ever use. You can type in expressions and have them evaluated immediately. Once you have GHCi running, type this in: