How to write a desktop app that filters test questions according to topic [closed] - filter

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What programming language/method would be best suited to writing a desktop app that
filters question types and displays a listing of those questions to view.
For example, if I have a mix algebra, geometry, and calculus questions stored in the app,
I should be able to select just the algebra questions to view and print.
I have a little experience with python/django but I've never made a desktop app before.

You have lots of options. You will need to make several design decisions before you move forward. Things to consider are:
Which technologies do you feel comfortable with?
How much time/effort do you want to put into the project?
Are you willing to spend money on tools?
Etc.
That being said, the rest of this answer is to give you some options to consider:
You'll need a data structure which can filter the problems for you.
From your description, the first thing I thought of was using a
database, however I'm not sure if you are familar with databases, in
which case you'd have to create some classes/structs that would allow for you to do the filtering yourself. Some options for databases are SQL Express, Oracle, MySQL, DB2, and many more.
Another thing to consider is you mentioned several different type of
math problems. You'd want to consider how you would be displaying
the problems. Mathematica formats math problems nicely, but if you
wanted to go down this road, you'd either have to find a tool that
would allow you to display that math problems in a syntax like
Mathematica or do exports/screen shots of the problems and have those as
part of your program.
Another option would be to try to find a
language that has some sort of plugin for TeX or LaTeX (For example,
you can see how wikipedia allows for nice math formatting here:
http://en.wikipedia.org/wiki/Help:Displaying_a_formula
This sounds like a good pet project to play with to learn different technologies. If that is the intent, great. If not, then you might want to do some googling to see if someone else has already created what you are looking for.

Related

I've been programing for six year and my homework in University gets marked down for coding style [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been programming for the last 6 years. I just recently started my first degree in computer science. My work seems to be constantly marked down for different reasons, amongst many of them:
Uncommented code
Writing too long identifier names and methods
Writing too many methods
After working as a programmer for six years for numerous startup companies, and absorbing best practices which include the requirement to write "self explanatory code" I find it very difficult to go back to bad practices.
What can I do?
Self documented code is not synonymous with comments.
I've argued with many senior devs around this point. Code can go a long way in communicating intent but there are some things which simply cannot (and should not) be documented through code.
For example if you have a highly optimised function/method or chunk of code which is heavily coupled to the underlying problem domain and requires very specific knowledge of the business or solution. Comments are needed in these scenarios.
Yes, yes, comments come with there fair share of problems but this doesn't mean they aren't helpful (or mandatory in certain cases).
I can't tell you how many times I've read a colleagues line of code and thought "what the hell?!?" only for them to explain that they needed to do that due to some quirk of some library or browser we were targeting etc.
Comments are a mechanism for a developer to justify a design decision.
As for your other problems, they are subjective. How long is too long? How many is too many?
Point them at Microsoft's guidelines if you are on the MS stack or there will be countless articles for whichever language you're using...
Hope that helps.

Cool, visually-transmissible uses of Prolog [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I will be teaching only one lecture on basic Prolog to students with little to no experience in programming. I'd like them to see that programming and Prolog can be used in the real world, perhaps even to do cool things.
I have looked at this and this threads, but I cannot find anything that is visually appealing that I can show them when we wrap up the lecture.
Do you have any suggestions for cool applications that use Prolog? I'm especially looking for something that can be shown as a video or slideshow.
If what you want is to highlight the uses of prolog and use audio-visual media merely for presentation purposes, combining the following 2 links might do it:
Natural language processing with prolog in the IBM Watson system
IBM's Watson supercomputer destroys all humans in Jeopardy
Dynalearn is implemented in Prolog and has animations.
See:
http://personnel.univ-reunion.fr/fred/Enseignement/Prolog/index.html
under "La librairie clpfd", there are links to 3 finite domain constraint animations (N-Queens, Sudoku, Knight Tour) that are used in this class.
InFlow is written in Prolog. You may browse through the examples and / or contact the author for details. VisiRule might also help.
Disclaimer: I have not used either InFlow or VisiRule, but I do use WIN-Prolog which is the environment used for both programs.
+1 for Visirule. It is, as far as I can tell (and I've researched this topic quite a lot) a unique visual programming tool (I don't know of any other visual tool that is easily reduced to a turing-complete language). I have implemented a trouble-shooting website with it along with various other solutions. Highly recommended- version 5 coming out soon too.

Good newbie instructions for creating minimal complete bug examples? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
So, those of us who've been answering questions and dealing with bug reports for a while are all deeply familiar with the concept of a "complete, minimal example". You start with a gnarly huge pile of code that's got a weird error, and you want to ask someone about it. But you don't want to send them the whole mess, so you start cutting the pile of code down into smaller pieces, until you get this little crystalized 20-line gem that still has the same bug you started with.
(And then, at least half the time, you realize what the bug is because it's staring you in the face like a luna moth, and you don't have to ask after all. But that's a side effect.)
Doing that sort of code-reduction isn't a skill that everyone has -- it takes a bit of practice, beyond the fact that a lot of newbies haven't yet learned that they ought to do it in the first place. There are several excellent sets of instructions for newbies on how to ask good questions (e.g., ESR's classic "How To Ask Questions The Smart Way"). Are there good instructions out there that explain what exactly a minimal complete example is, and how and why to create them?
It's all in the name. A complete minimal example is an example that is complete and minimal. Complete means that it contains all pertinent information, and minimal means it contains no information that is not pertinent. The ability to identify what is an is not relevant is something that only comes with practice - trying to provide instructions for this seems a little like trying to provide instructions on riding a bicycle. You can give the technical explanation and describe the mechanics (and the TeX FAQ you linked to does that very well) but in the end the only way to really learn is by doing.
I'll start this off with the ones I'm familiar with; these both come out of the TeX community, and so are a little oblique for programming. I'm hoping other people have better answers.
The TeX FAQ has an entry on How to make a “minimum example”.
That page points to a somewhat longer article on "What is a minimal working example?". Again, this is for TeX documents; the ideas are the same, but the tools and details a little different.
Edit (2013/01): Another one that I noticed in a StackOverflow comment: The "Short, Self Contained, Correct (Compilable), Example" page. Not perfect, and it suggests 20kb (!) as an upper limit, but a good addition to the list.
Edit (2013/02): Jon Skeet has a blog post about writing good questions, which includes a section on sample code that seems useful.

Algorithms/problems to solve while learning a new language [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
At some point in our lives we're put in the situation to learn a new language (either by job requirements or just passion). Personally, I'm trying to learn Objective-C coming from a background of several years coding php. My problem is that I'm bored with your average starting programs (most of them coming from maths; eg: Fibonacci).
What are your first algorithms and programs you write when learning a new language?
I'm thinking we could make a list of interesting problems to be solved and that would make the learning curve at least more entertaining.
Later edit:
My question is about fun things (and also useful), but not like Code Kata or other very boring math stuff (I've done many of those already)
Later edit [ 2 ]:
I found this today and the problems there seem fun to do.
Try to develop something proper, a project of some kind; solving algorithmic problems really only teaches you to apply the algorithm, not really a lot about the language your using.
Deciding on a useful project then deciding on a language and then 'doing it' will cover many of the bases you need to learn a new language.
I like this series of articles by Larry O'Brien.
http://www.knowing.net/index.php/2006/06/16/15-exercises-to-know-a-programming-language-part-1/
http://www.knowing.net/index.php/2006/06/16/15-exercises-to-know-a-programming-language-part-2-data-structures/
http://www.knowing.net/index.php/2006/06/16/15-exercises-to-know-a-programming-language-part-3-libraries-frameworks-and-mashups/
Have a look at these:
How do you find interesting problems to solve?
https://stackoverflow.com/questions/6327/what-are-your-programming-exercises
Just as an idea: Look at the problems of the The Computer Language Benchmarks Game.
When you've done a snippet, you can compare your solutution to the provided one.
Whenever I pick up a new language, I try using it to solve the problems at SPOJ. They basically support every mainstream language out there (as well as a few esolangs like Intercal and Whitespace). The problems are mostly from various ACM and similar format contests around the world and so can be quite hard, and perhaps be too CS/math for everyone's tastes. The tutorial problems are quite doable in any language.
I would also recommend adding that language's tag to your SO interested tags list. Many SO questions involve small snippets of code, and trying to answer them and looking at the other answers can be very enlightening.
But as soon as I've got the basics right, the strategy I choose is to try my hand at a very small project. Usually this a simple game, GUI app or a tiny webapp. This is valuable since there are some things you cannot learn by only doing small isolated blobs of code.
Try to solve these challenges using your new language. What's it all about:
In software we do our practicing on
the job, and that’s why we make
mistakes on the job. We need to find
ways of splitting the practice from
the profession. We need practice
sessions...
I sometimes use the exercises from the first few chapters of Structure and Interpretation of Computer Programs.
You can also try to understand or improve existing open source projects as suggested in this so question. Even though the answers are cocoa biased it should be a good starting point.
This way you can dive in to the level of your choice (understand, debug, improve) and in direction of your interest (UI, specific library, etc, etc...).
EDIT: When I said starting point, I meant that you can browse repositories for objective-c code, for example sourceforge

Managing code transitions between developers [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
What are your best practices for making sure newly hired developers quickly get up to speed with the code? And ensuring developers moving on don't set back ongoing releases.
Some ideas to get started:
Documentation
Use well established frameworks
Training / encourage mentoring
Notice period in contract
From a management perspective, the best (but seemingly seldom-follow) practice is to allow time in the schedule for training, both for the new employee and for the current developer who'll need to train them. There's no free lunch there.
From a people perspective, the best way I've seen for on-boarding new employees is to have them pair program with current developers. This is a good way to introduce them to the team's coding standards and practices while giving them a tour of the code.
If your team is pairing averse, it really helps to have a few current diagrams for how key parts of the system are structured, or how key bits interact. It's been my experience that for programs of moderate complexity (.5m lines of code), the key points can be gotten across with a few documents (which could be a few entity-relation document fragments, and perhaps a few sequence diagrams that capture high-level interactions).
From the code perspective, here's where letting cruft accumulate in the code base comes back to bite you. The best practice is to refactor aggressively as you develop, and follow enough of a coding guideline that the code looks consistent. As a new developer on a team, walking into a code base that resembles a swamp can be rather demoralizing.
Use of a common framework can help if there's a critical mass of developers who'll have had prior experience. If you're in the Java camp, Hibernate and Spring seem to be safe choices from that perspective.
If I had to pick one, I'd go with diagrams that give enough of a rough map of the territory that a new developer can find out where they are, and how the big of code they're looking at fits into the bigger picture.

Resources