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.
This may be the weirdest question ever made here...
But its for a programming class animation project where we are learning about the differences about paradigms.
The project is based on the "Hi I'm a Mac, Hi I'm a PC" advertising, but instead of being about OS, we must show in an animation the differences between four different languages with four different paradigms...
My idea... romantic and artistic as i think i am... is that the 4 would compete for a girl to whom they want to declare their love by giving her a letter.
Chessy, right?
The "cool" part is that the girl looks like this concept art and the letter would just say: "Hello, World." :)
So...
if you still don't think this is the stupidest thing in the world, and this is allowed here, this is my question:
**
Which are JAVA'S, C'S, VISUAL BASICS'S, RUBY'S or PHP'S "personalities"?
**
For example:
Java (object-oriented) - gives her lots of gifts
Visual Basic (event-driven) - dates, events, parties
And that's it...
Do This languages would work? I'm still not sure how different they are?
Should i get other languages so it would be easier to understand the differences between paradigms? Any opinions about the animation? Should World stay single?
any help of ANY kind would be amazing, thanks :D
Here's some info which might help:
VB is stodgy, corporate, square-headed & crufty -- like Dilbert.
Ruby is like a web designer -- flashy & quick but probably crunky behind the scenes.
Java is like an expensively-suited contractor, integrating to mainframes.
C is like.. a hairy-bearded engineer, with a big wrench & some bare iron?
PHP is like.. some Unixy guy, more a VI/ text processing guy rather than the C guy?
Fill in the ways they express these personalities, yourself. Java guy can have a flash car & work on airline reservation systems (hence travel). Web designers are pretty easy to characterize. You do the rest.
Related
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.
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.
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.
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 13 years ago.
Matz said :
I designed Ruby to minimize my surprise. I wanted to minimize my frustration during programming, so I want to minimize my effort in programming.
But sometime we get (bad) surprise in ruby practice.
As beginner in ruby, I found some example :
Exception Thread do not produce any immediate traces by default, we must do Thread.abort_on_exception = true or don't forget to join all thread.
socket search dns name for any accept, do BasicSocket.do_not_reverse_lookup = true for do not be surprise by long delay
split(regexp) don't split empty field in the end of string, do split(regexp,-1) for splitting all string
string.trim is unknown, use sting.strip in place (for old tcl dev...)
Have you other case for improve my ruby practice ?
thank you.
The design of Ruby the language is different from the design of Ruby libraries (which mostly seem to be what you use as examples). Matz designed the language around the principle of least surprise, but not every library (even modules in the Ruby standard library) were designed that way. (Keep in mind that Matz didn't write every Ruby library, or even the entire Ruby standard library, himself.)
A gentle note, I think you are over-extending the idea of least surprise. To me you are extending Matz's idea of least surprise from his idea of least surprise to include your idea of least surprise. Remember that what surprises you may not surprise another and may in fact surprise them if it worked the way that you think it should. All that said, it's good to voice your opinions about how you think it should work because we can all learn from it but to say that "we get (bad) surprise" is extending your idea of surprise onto others.
As for me, all of these examples have the feel that you want these to work better for your preference (or app) than the general case.
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.
I have recently started learning Ruby, as my first programming language. I feel comfortable with the syntax, and I've done numerous tutorials that just teach the same basics. I have written a few small programs (including my own method for sorting an array that I thought was pretty smart until someone told me to Google 'Bubble Sort'), but I feel I need to attempt something bigger and harder to understand more about Ruby. Any ideas as to how I can do this?
Ruby Resources
http://www.rubyist.net/~slagell/ruby/
http://web.njit.edu/all_topics/Prog_Lang_Docs/html/ruby/syntax.html
http://www.ruby-doc.org/core-1.8.7/index.html
http://en.wikipedia.org/wiki/Ruby_(programming_language)
http://pleac.sourceforge.net/pleac_ruby.html
http://www.zenspider.com/Languages/Ruby/QuickRef.html
http://www.ruby-doc.org/docs/ProgrammingRuby/
The "advanced" Ruby book is The Ruby Way by Hal Fulton. It wouldn't hurt to read some real Ruby code - most gem's will do for this.
Finally, you need a project. You could take a program you have already written and redo it in Ruby, or you could think of something new to write.
Rubylearning Blog is hosting a fortnightly contest. The first contest went live - http://rubylearning.com/blog/2009/09/24/rpcfn-shift-subtitle-1/
That should be a start :)
A few years back I worked through Dave Thomas' Code Kata as part of a similar exercise. Fairly simple, self-contained pieces that let me explore the language at my own speed.
The kata idea seems to be moderately popular with developers, particularly at the Agile end - Googling "code kata" with and without "ruby" ought to throw up some more ideas.
fellow newbie. :) I too have just recently started learning ruby.
Right now, I'm reading The Ruby Way. Although I'm not required to code at work, I try to find practical applications of ruby -- no matter how mundane. For instance, I prepared scripts when I needed to test something that required several files with 0 file size and when i needed to generate an xml file based on another xml file; and since there was a tennis meet at work, i tried to create a script for random pairing or grouping. (Little baby steps, i know)
My colleague has written a post listing out the resources that a Ruby newbie would find useful. It was primarily intended for members of our local Ruby User Group, but it should be useful to you too.
More importantly, a lot has changed in the last couple of years and this post is pretty up-to-date (as of September 2012).
Here's the link: http://www.jasimabasheer.com/posts/meta_introduction_to_ruby.html