coding exercise with example solutions - language-agnostic

I'm looking for coding exercises that have solutions. I've checked out topcoder and codekata but neither seem to have user posted solutions (maybe I just can't find them?).
Basically I can (try) to figure out how I would solve a problem but what I want is to learn and expand my knowledge by see how other (better) coders would solve the same thing.

ProjectEuler has some good fairly good problems that lend themselves easily to a coded solution. There is no site supported help system, but simple google searches with the number of the problem you are working on normally has good results.
Once you solve the problem, you then have access to the site solution and a forum posting that shows other users' solutions so you can learn from them, (If you solve it first).

In TopCoder you can find the solutions in Competitions > Algorithms > Statistics > Match Archive, there you select a match and statistics will be displayed. After that by clicking "[*]" at the left side of the handle name, you will be lead to the solutions submitted by that coder.

Related

Why design by contract isn't more popular?

In theory, it seems like a great solution for avoiding bugs, but why in practice we hear so little about it?
Why can't we see more support for it on Java or .net for example?
i have been searching around for this answer too. But it seems like its not popular among the programming world. Therefore theres not much people discussing about it.
I tried using it, however i find it a hassel to really think what contracts i should write while i am programming. However its good for debugging.
have you tried? whats your comments on it?

The hunt for a CSS attribute-editable Interactive User Interface Learning Tool

I am attempting to learn css attribute relationships. With my current knowledge, I would venture to say that there are only about 30 or so attributes that the majority of web pages are built around, but how you match them up is what gives one page a cleaner look, better functionality, and an overall better experience for the user. Currently I am getting feedback that the 'only' way to learn is by a combination of experience and looking at examples of implementation(s) on webpages that have the feature(s) I want, and trying to replicate. I think this is too time consuming, and not an effective tool for someone wanting to develop a solid approach to CSS. Is/are there tools that you have used similar to any of the below that help you understand the interaction of the attributes for basic manipulation of semantic markup?
Current tools that have GUIs to allow quick feedback of attribute/element manipulation:
JSFIDDLE : An online platform for viewing HTML, JS, CSS, and the result in one window, allowing for common shared code.
Button Maker : Dynamic CSS/HTML generation for a graphical button.
SourceTree : For understanding repository structure for Git,
Mercurial and SVN version control systems.
Eclipse : An IDE with 'desktop' organization of multiple implementations, code, and information panes.
CodingBat : An online console for learning Python or Java by 'snippet' coding and viewing results of different passed parameters.
Codeyear / CodeAcademy : An online IDE to allow for both 'snippet' coding and viewing CSS/HTML/JS/results in several structured learning paths.
Specifically, I would like to learn the relationships of postion based styles, such as fixed, float and such.
For me, the best way to learn: Think up of something you want to make. Make it. Go through the process of finding out what works and what doesn't. Figure out how to fix it. Fix it. Be amazed at how crappy the result is. Repeat.
You won't learn all the little tricks by looking at independent examples. You won't learn much by "looking at" anything. Do it. Once you have a basic grasp of what's going on, make something. Copy something. Time consuming? yes, sure... if you say so. Experience comes with time.
The thing with copying other people is that you don't know the process they went through. Why did they do something a certain way? Is it even right? Just because somebody put it online doesn't mean it's any good.
So specifically, what function do you want to implement? Google that, read all the different ways people do it. Find one that you like, implement it. Tweak it. If you don't understand, look into that.
I think there's a term for when you're trying to find something, you go from one (related) thing to another until you forget your original issue... That's bad when you need to be productive. It's perfectly fine here, where you just want to learn everything.
For some things, it's important to have structure. Once you learn the basics, I think having some sort of structure or system will just slow you down. I like to go at it and solve a problem, learning as I go. When I'm trying to figure something out, I have nothing but Notepad and Chrome with a lot of Google search results tabs open. You don't need all these GUI tools. Sure they might make your development go a little faster with their auto complete or error warnings, but what's your rush?
Don't spend so much time finding the perfect set of tools that you never get to the thing you were finding those tools for. Just do it.

technical comparison between the differences in html of jquery mobile and webapp-net

I am trying to build an application for smart phone devices. I have searched a lot over the web and I found some good toolkits, These are the toolkits I am considering to work with. Jquery Mobile and webapp-net.
The only problem is I need to kknow about the technical differences in html of these two toolkits. so if you please help me.
BTW this is my second account here, with my previous account i cant not ask any questions here, I want to know what are the reasons to close someones account, I am only here because I need help, and I dont want to waste anyones time. I come here to ask a question and then, some one comes and just does something to my account and I dont even know why they do that. So what is the point of this website if you close some ones account???
When consider Jquery Mobile and webapp-net, JM is elder and is coming from rich and stable family, that never ment webapp is poor, but you have much recourses and help from the net if u start ur work with JM.

Where can I find previous ACM ICPC contest problems?

I'm leading a small group of developer at my university and I'd like to work through a couple of ICPC problem sets from previous years.
Searching on Google yields no useful results, just page upon page of broken links and private .edu domains.
Does anyone know where to find these problem sets from previous years?
Found the motherload here:
http://livearchive.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8
You might also like the following problems:
Google has posted some interesting problems. People also post their solutions, so you can see how others implemented a solution.
http://code.google.com/codejam/contests.html
Reddit is also another good source to get interesting problems.
http://www.reddit.com/r/programmingchallenges/

Providing in-form help in MS Access

I'm a non-developer building a simple Access 2003 database for an NGO that works in developing countries. I would like to provide in-app help (what certain fields mean, for example) in a number of forms and on the switchboard. I'm not sure about the best way to do this - not just on a technical standpoint but to increase user-friendliness. The users are usually using MS Access for the very fist time, and have only basic computer use knowledge.
I don't want to cram the forms with help text, so I'm thinking of adding little question mark buttons that pop up a separate form with just help text. Is that wise?
I've also noticed a Help Context ID property, but it looks complicated (I'm looking for something as simple as possible to implement, so that the help text can be edited as easily as possible by others in the future). I think this is where I'd start if this were the way to go: http://support.microsoft.com/?kbid=209843
This may need to be translated, etc, so again, the simpler the better.
Thanks!
I've built such a system using tables and forms in the FE. You can get an idea by reviewing some of the screen shots at http://www.granitefleet.com/ScreenShots/index.htm I only created general help describing processes where something on a setup form can affect this form. So the user will know where to ge to change something around.
If you haven't built your forms yet, put that information in the table design, using each field's Description. That will propagate through your forms, and will be displayed on the Status Bar whenever a user click in that field.
If your forms are already done, use the [Status Bar Text] and/or the [ControlTip Text] property of your controls.
Just train your users or write once that they should read the Status bar if they need more explanation.
KISS (keep it simple and simple)
Great question. I think the real solution to reducing the amount of work that you need to do is to work really hard on having a simple, clean UI. In the real world there are very few people who have the patience or inclination to read the manual or search the contextual help even in the face of being stuck.
I know this is slightly off topic from the question but if you look at this website for example it keeps the number of things you can do on anyone 'screen' down to the minimum and everything has a tool tip (ControlTip Text in msaccess). Even if site this was in Japanese, I thin i could navigate around it fairly easily and that is because of its simplicity. (I couldn't answer any questions though :P)
Jakob Neilsen has a great site on usability
" I think the real solution to reducing the amount of work that you need to do is to work really hard on having a simple, clean UI. In the
real world there are very few people who have the patience or
inclination to read the man*emphasized text*ual or search the
contextual help even in the face of being stuck.*
Regarding this, it really depends on the application. It is overly simplistic to assume that every application can have all the information it needs to be operated just by having a simple clean UI, especially if in the name of being simple, there are alot of useful features that are not included. In certain complex applications, people will simply need to have patience and read the information available or they will waste a lot of time guessing. It is better to have have information at the press of a button than have them asking for it once they figured out that they are wasting time figuring it out with no help. I agree that many apps are way more complicated than they need to be.