I give up. The TIOBE data very clearly shows ruby to be in a long decline which has flattened out in the last year.
It's obvious to anyone capable of looking at the chart. I honestly don't see how you can continue to deny this, or why you'd even bother.
Then again, you don't seem to be terribly good at paying attention:
As far as TechCrunch is concerned,
TechCrunch is reporting on RedMonk's language ratings. I included that link as I thought that a simplified exposition would be helpful. I guess I was wrong...
Now, what was it you wanted to teach me about statistics?
How about we start with this: A single data point does not indicate a trend. You need lots of points over time for that.
Again, all the data suggests that ruby is either flat or in decline. The TIOBE data shows that it's in decline and starting to flatten out (that's not growth) The data from RedMonk show Ruby to be flat (that's not growth). The data from Ohloh suggest that ruby is either flat or in slight decline. (They're NOT "dramatically different" at all. I'd say they agree remarkably well, especially considering that their methods for determining popularity are so dramatically different!)
Your 5th reference claims to show a graph of the TIOBE Index but the graph is actually nothing at all like the actual TIOBE index.
It's not my fault that you're having trouble interpreting the chart.
Your third link is about Rails, not Ruby. Again, there is a rather large difference. They are far from the same things.
If you read my post, I suggested that ruby's rise in popularity and subsequent decline was tied directly to RoR. I thought it worth including as the search is also the most viable proxy for ruby. (Necessary, as using ruby by itself pulls in too much irrelevant data -- so much so that the chart runs nearly flat, as you would expect if you were searching for a common term like "emerald" or "gold" or "women".)
Why is this so important to you? Why do you even care that ruby is in decline? Why this vehement denial? Accepting the TIOBE data as-is clearly shows that ruby is in a long-term decline that has flattened out over the last year.
It's just a programming language. I promise, you'll get over it.
Completely untrue. Here [ruby-forum.com] is documentation of someone complaining about a potential regression error in step for ranges when Ruby went to version 1.8.6. So obviously it existed even before then.
Yep, I was off a bit. I couldn't remember the exact version, so I did a google search and trusted a forum post. Anyhow, it turns out it was added in 1.8.0
I disagree on several levels. Not only is it a year old
I wrote:
It was too old to make my earlier list (January 2012)
To which you replied:
I don't find that this informs me about the TIOBE Index at all.
I'm not surprised. You don't seem terribly interested in the data at all.
Again, if you look at the data from the past few years, you'll see that Ruby is at best flat, and likely still in decline. I've offered my opinion as to why it's in decline.
You can disagree with my opinion all you want, and you can disagree with the methodology of the various sources. That's fine, and we can have a discussion about that.
You can't, however, argue the fact that the data presented shows Ruby to be flat or still in decline. The data that we have does not in any way show that ruby is growing -- quite the opposite, in fact! According to the TIOBE index, that you seem to favor, it has been steadily declining since 2009 and started to flatten out this year.
I know that you like ruby, and that ruby is important to you. I'm sorry that it's not as popular as you'd like. That's not my fault. It's also not relevant to the question: "Is ruby in decline?" Unless you disagree with the data, the answer is clear.
It was too old to make my earlier list (January 2012), but it's still quite relevant and informative. It should also help you make much better sense of the TIOBE data.
No one cared about Ruby before RoR -- and now that RoR has fallen out of favor (the fad is over) so will Ruby. Trends appear to show Ruby as flat or in decline.
I know that you really like Ruby. That's fine. But let's not pretend that it's growing in popularity. It doesn't matter if the rumors about Ruby and RoR are true or not -- or that such-and-such criticism is just a myth or whatever else you want to bring up in defense of the language. The fact is that it's in decline and unlikely to ever again enjoy the hype it did years ago. Sometimes, being just the best thing ever in the whole of all history just isn't enough to make something popular.
You seem to have a lot emotionally invested in the language (or other people's perception of the language). Just let it go, kid. In the grand scheme of things, it's not at all important.
No one cares about ruby. It's a dying little niche language. It had a good run, but that's all in the past now. To me, ruby never really felt complete. (It didn't even get a step method to its range class until 1.8.7) There was always some absurd limitation you had to work around or some needlessly obscure feature or rule to learn before you can do something obvious in just about every other language (What's up with things like this? 10.times { |i| puts i } madness!)
Python, well, python enjoys some popularity, but I just don't think it's likely to hang-on like perl. Probably because of the whitespace issue and the big 2.x 3.x split. Perl filled a particular niche really well, and was a good fill-in in a few others (remember when it powered your website's counter and guestbook?). Python never really found a home as there isn't any particular area where it really stands out -- or is even arguably a good fit. You'll find a lot of "it can be used for..." but not a lot of "It's really great for..."
As for readability, well, I can't say that it's a terribly readable language. I get that everyone is forced to indent their code (apparently, the whole world forgot about pretty printers) but that's not all there is to readability. Neither is readability all there is to maintainability. (You could even argue that the whitespace rules actually hurt readability, as it takes away otherwise helpful cues.)
Let's not forget that you don't have to write illegible perl code. Really, it's not required!
COBOL's staying power was due to much more than "sunk costs". It was, and still remains, the best tool for the job. You'll find tons of failed COBOL to Java conversion projects from the late 1990's as a testament to that. It's really hard to beat COBOL on performance and even harder to find a language that's as easy to read and maintain. (Not that there isn't lots of room for improvement. It was designed to be readable, however, and it shows.) In short: It's easy to learn, easy to read and maintain, and lightning fast.
Anyhow, to answer your question: Manipulating strings is a strength that is not shared by many other languages to any significant degree, and this makes it a great fit for a broad range of applications to which python and ruby just aren't as well suited. (Working with strings in python 2.x is terrible -- even just outputting them can be troublesome due to the bizarre default behavior of 'print'. This has improved, but not much, in 3.x) I would argue that PHP is popular due in no small part to that as well (I've always thought of it as a simpler version of perl. A related note: PHP was originally written in perl.)
Now we can complain about Apple causing problems with their poor standards support. (Their refusal to include support WebGL outside of iAds drives me nuts. Perhaps they feel threatened by it like they felt threatened by Flash?)
I'm not so sure about that. Microsoft has a long history of killing products and platforms.
XNA, so I hear, is a recent victim. There have also been quite a few rumors about the impending demise of.NET for a little over a year now. A quick google search will turn up a host of other examples both old and new. The point, of course, is that they're no more stable now than they've been in the past.
No trap. That's why I wrote "It's not a trick question".
I was hoping someone would point out the difference between knowledge and belief -- a distinction that's often missed by the average internet atheist, leading to some hilariously misinformed comments. (One of my favorites is the "lack of belief in any gods" vs "believe that no gods exist" schtick. That one's funny because they're clearly trying really hard, yet failing so absolutely.) I'm not usually one for schadenfreude, but that particular crowd has spread so much misinformation about science and related topics that I can't help but enjoy seeing them flail.
If you can accurately define both of the terms (atheist and agnostic) I'll retract my "Ha!". (It's not a trick question, it's really quite simple. In my experience, however, people who write, well, what you wrote above don't have the faintest idea what either term means.)
You cannot be a Jedi as it is an entirely fictional belief system.
I didn't realize there was a way to evaluate a religion to determine its validity as a religion...
I suppose we could use the "from my ass" method for data acquisition and apply an "internet forum consensus" procedure. That's a pretty popular approach.
The alternative, I suppose, is to use the gestapo tactics you'd necessarily need to employ to assess the accuracy of census participants responses (for purposes of identifying the liars so that they may be prosecuted) to see if any of alleged Jedi are practicing. Unfortunately, that's not enough to guarantee that they're lying as they might accept the orthodoxy but not the orthopraxy. On the other hand, once you've tossed out civil liberties, why would you care about a bunch of false convictions?
Maybe you're just out to capture all the Jedi? Is lying on the census treason? Is that still a capital offense?
Wait, are you actually out to inefficiently kill all the Jedi?
Well the thing is with the spaces on the sides of " | " you really CAN'T get an isolation since you can't close off a box. With the gaps you can go around basically any corner and get where you want.
Ignore my last reply to that quote. I completely misinterpreted it. Sorry about that!
Anyhow, here's a JavaScript version of the program so you can see how the maze ought to look without dealing with troublesome spaces and the like.
With a simple modification you can make the cells swap their south and west walls when you click them to see how the maze changes. It gives you a good sense of how the algorithm works:
int main(int argc,const char* argv[]){ int h, w, i, j; h = w = atoi(argv[1]); srand(time(NULL));
for(i=0;i<w; i++)
printf(" __"); printf("\n");
for(i=0; i<h-1; i++){
printf("| ");// two spaces
for(j=0; j<w-1; j++)
rand()%2==1?printf(" __"):printf("| ");// two spaces
printf("|\n");
}
printf("|"); for(i=0; i<w-1; i++)
printf("__ ");
printf("__|\n"); return 0; }
A space got filtered out on line 80 and 100 -- it should be in both cases "[pipe][space][space]"
Well the thing is with the spaces on the sides of " | " you really CAN'T get an isolation since you can't close off a box. With the gaps you can go around basically any corner and get where you want.
It's the best you can do with underscores, pipes, and spaces:) Try out the working program and you'll get a good sense of how it's supposed to be.
If you want, I can make a javascript version so that it looks nicer. Just ask and I'll post some code for you.
I was thinking about that and wondering how a randomly generated maze could have such attributes such as no loops or isolations, I gave it a try...
A Binary Tree Maze is just the easiest kind to make. It doesn't make the best kind of maze, as you'll see, but it meets all the criteria for a perfect maze. There are lots of other interesting algorithms that will let you randomly generate a maze with those properties -- and MUCH better results. My favorite is Eller's Algorithm -- you should give it a look.
Here's the reality that no one wants to talk about: Money DOESN'T buy happiness; it buys freedom. Smart people have no problem turning that freedom into happiness.
What a lovely platitude.
I won't argue that money can offer freedom (in some circumstances). I should note, however, that it can enslave just as easily.
Also, don't overlook the fact that you can trade money for freedom. You can, for example, accept a job at a lower salary that offers you more freedom than a different job at a higher salary. In that same sense, money can "buy" happiness as well -- in the earlier example of taking a lower-paying job that you enjoy over a higher-paying job that you dislike.
Only poor people say things like this.
Poor people would say: "Only wealthy say things like this. It's easy to say money doesn't matter when you're loaded." It's just empty rhetoric in both cases. Let's not pretend it's insightful in any way.
People with money never do, because they recognize that it's an utterly false dichotomy.
See above. Also, where did you come up with the bizarre idea that this was a true dichotomy? That wasn't implied by me or the parent.
(Also, I can't help but notice that the income range you include starts at $60K at the low end. Not exactly a barista salary.)
What do I know about the salary of baristas? Thankfully, not much. Though thanks to you, I now know that they likely make less than $60k/year. (That's crazy, isn't it? How can they afford all of that new Apple stuff every year?!)
When I finished grad school, I had a whopping $2500 in debt remaining. The comments here are loaded with similar stories.
The college graduate drowning in debt is no different than the irresponsible 20 something with too many credit cards, the young couple who bought a house they couldn't afford, or the line-cook with a sports car.
This is the (poor) thought process:
Step 1: Go to school. (Associates degree in Criminal Justice. I freakin' love CSI and similarly themed programs!) Step 2: Enjoy glamorous independent lifestyle!
They made bad financial decisions. They did not plan for the future -- they indulged in fantasy.
Don't get me wrong, a little escapism isn't necessarily a bad thing. A dollar for a lottery ticket or a quarter for a round of space invaders is harmless and could even be healthy. Dropping $100k to buy a failing restaurant with dreams of making millions reopening it as "La Petite Chateau" (the best high-brow coffee shop to hit your small working-class town in Iowa) is neither harmless nor healthy.
I should note that an education is never a poor investment. The trick is to plan ahead so that you're not being crushed by overwhelming debt afterward. If you're just starting out, pickup as many inexpensive undergrad credits as you can from, for example, a local community college. Undergraduate degrees aren't especially important, so don't be ashamed to finish your first four-years at a state school. You go to Cornell for the great connections, not because you'll receive a better education.
If possible, work while you're in school and start paying down those loans. You'll be amazed at what a difference that will make. It doesn't matter if it takes you an extra year or two to finish your degree -- no one will notice or care -- and it sure beats a decades worth of crushing debt!
You're not allowed to play the "money doesn't matter" card when the whole point is discussing taking out mortgage sized loans for overpriced tuition based on lies about the job market.
Something happened to me last week. I didn't buy a handy kitchen appliance I saw in a television ad. The commercial told me that said product would make a myriad of common kitchen tasks "a breeze", how simple clean-up would become, and how I could get a second one free, just by paying separate shipping and processing. You know what? I didn't believe it. I thought the the commercial was misleading. I exercised my judgement and concluded that such a purchase would be unwise. Even though supplies were limited and I had to act now, I took the time to think about the product and how it would ultimately benefit me before hastily dialing that bright-yellow toll-free number shown at the bottom of the screen. I'm now still in possession of that 19.95 + 7.95 s/h.
Neat trick, eh? You don't have to blindly believe claims made by anyone trying to sell you a product or service.
See, If you plan ahead and make good financial decisions -- that's reality-based decisions, not delusional, fantasy-based, decisions -- you can "play that card".
Yes, money doesn't really matter. I'll take happiness over money any day of the week. All that matters is that you can provide a comfortable life for you and your family. A $60k/year job that you love is easily a better pick than a $120k/year job that you hate.
Re:Did Zuckerberg ever have to get past HR?
on
Just Say No To College
·
· Score: 4, Funny
Translation: "I'm super-smart and everyone I work with is a drooling moron compared to me. They can offer me nothing that I haven't already considered and likely rejected. Everyone is wrong and should listen to me. I know best, after all. I'm a specialist."
Folks, this is what happens when you "Just Say No" to a college education. The autodidact with an over-inflated sense of self-worth and a penchant for misanthropy.
I give up. The TIOBE data very clearly shows ruby to be in a long decline which has flattened out in the last year.
It's obvious to anyone capable of looking at the chart. I honestly don't see how you can continue to deny this, or why you'd even bother.
Then again, you don't seem to be terribly good at paying attention:
As far as TechCrunch is concerned,
TechCrunch is reporting on RedMonk's language ratings. I included that link as I thought that a simplified exposition would be helpful. I guess I was wrong...
Now, what was it you wanted to teach me about statistics?
How about we start with this: A single data point does not indicate a trend. You need lots of points over time for that.
Again, all the data suggests that ruby is either flat or in decline. The TIOBE data shows that it's in decline and starting to flatten out (that's not growth) The data from RedMonk show Ruby to be flat (that's not growth). The data from Ohloh suggest that ruby is either flat or in slight decline. (They're NOT "dramatically different" at all. I'd say they agree remarkably well, especially considering that their methods for determining popularity are so dramatically different!)
Your 5th reference claims to show a graph of the TIOBE Index but the graph is actually nothing at all like the actual TIOBE index.
It's not my fault that you're having trouble interpreting the chart.
Your third link is about Rails, not Ruby. Again, there is a rather large difference. They are far from the same things.
If you read my post, I suggested that ruby's rise in popularity and subsequent decline was tied directly to RoR. I thought it worth including as the search is also the most viable proxy for ruby. (Necessary, as using ruby by itself pulls in too much irrelevant data -- so much so that the chart runs nearly flat, as you would expect if you were searching for a common term like "emerald" or "gold" or "women".)
Why is this so important to you? Why do you even care that ruby is in decline? Why this vehement denial? Accepting the TIOBE data as-is clearly shows that ruby is in a long-term decline that has flattened out over the last year.
It's just a programming language. I promise, you'll get over it.
Completely untrue. Here [ruby-forum.com] is documentation of someone complaining about a potential regression error in step for ranges when Ruby went to version 1.8.6. So obviously it existed even before then.
Yep, I was off a bit. I couldn't remember the exact version, so I did a google search and trusted a forum post. Anyhow, it turns out it was added in 1.8.0
Cool! An official source:
http://ftp.ruby-lang.org/pub/ruby/1.8/changes.1.8.0
I disagree on several levels. Not only is it a year old
I wrote:
It was too old to make my earlier list (January 2012)
To which you replied:
I don't find that this informs me about the TIOBE Index at all.
I'm not surprised. You don't seem terribly interested in the data at all.
Again, if you look at the data from the past few years, you'll see that Ruby is at best flat, and likely still in decline. I've offered my opinion as to why it's in decline.
You can disagree with my opinion all you want, and you can disagree with the methodology of the various sources. That's fine, and we can have a discussion about that.
You can't, however, argue the fact that the data presented shows Ruby to be flat or still in decline. The data that we have does not in any way show that ruby is growing -- quite the opposite, in fact! According to the TIOBE index, that you seem to favor, it has been steadily declining since 2009 and started to flatten out this year.
I know that you like ruby, and that ruby is important to you. I'm sorry that it's not as popular as you'd like. That's not my fault. It's also not relevant to the question: "Is ruby in decline?" Unless you disagree with the data, the answer is clear.
No worries, I caught that.
You may want to check out this article from earlier this year:
http://www.drdobbs.com/mobile/the-rise-and-fall-of-programming-languag/232400093
It was too old to make my earlier list (January 2012), but it's still quite relevant and informative. It should also help you make much better sense of the TIOBE data.
Look at that, you found a chart. Good for you.
Statistically, what you say is just nonsense.
You don't seem to understand that chart, the methodology, or statistics in general.
Fun fact: Our little discussion here actually improves Ruby's TIOBE rank. Interesting, isn't it?
Other similar sites show similar results.
No, they don't.
http://www.ohloh.net/languages/compare?measure=commits&percent=true&l0=java&l1=javascript&l2=-1&l3=python&l4=ruby&l5=-1&commit=Update
https://sites.google.com/site/pydatalog/pypl/PyPL-PopularitY-of-Programming-Language
http://www.google.com/trends/explore#q=ruby%20on%20rails
http://lang-index.sourceforge.net/
http://spectrum.ieee.org/at-work/tech-careers/the-top-10-programming-languages
http://techcrunch.com/2012/09/12/javascript-tops-latest-programming-language-popularity-ranking-from-redmonk/
( http://redmonk.com/sogrady/2012/09/12/language-rankings-9-12/ )
No one cared about Ruby before RoR -- and now that RoR has fallen out of favor (the fad is over) so will Ruby. Trends appear to show Ruby as flat or in decline.
I know that you really like Ruby. That's fine. But let's not pretend that it's growing in popularity. It doesn't matter if the rumors about Ruby and RoR are true or not -- or that such-and-such criticism is just a myth or whatever else you want to bring up in defense of the language. The fact is that it's in decline and unlikely to ever again enjoy the hype it did years ago. Sometimes, being just the best thing ever in the whole of all history just isn't enough to make something popular.
You seem to have a lot emotionally invested in the language (or other people's perception of the language). Just let it go, kid. In the grand scheme of things, it's not at all important.
but most Perl "developers" are scripters, not programmers
This is, quite possibly, the stupidest thing I've ever read -- and I've been known to read the comments section on World Net Daily articles.
No one cares about ruby. It's a dying little niche language. It had a good run, but that's all in the past now. To me, ruby never really felt complete. (It didn't even get a step method to its range class until 1.8.7) There was always some absurd limitation you had to work around or some needlessly obscure feature or rule to learn before you can do something obvious in just about every other language (What's up with things like this? 10.times { |i| puts i } madness!)
Python, well, python enjoys some popularity, but I just don't think it's likely to hang-on like perl. Probably because of the whitespace issue and the big 2.x 3.x split. Perl filled a particular niche really well, and was a good fill-in in a few others (remember when it powered your website's counter and guestbook?). Python never really found a home as there isn't any particular area where it really stands out -- or is even arguably a good fit. You'll find a lot of "it can be used for ..." but not a lot of "It's really great for ..."
As for readability, well, I can't say that it's a terribly readable language. I get that everyone is forced to indent their code (apparently, the whole world forgot about pretty printers) but that's not all there is to readability. Neither is readability all there is to maintainability. (You could even argue that the whitespace rules actually hurt readability, as it takes away otherwise helpful cues.)
Let's not forget that you don't have to write illegible perl code. Really, it's not required!
COBOL's staying power was due to much more than "sunk costs". It was, and still remains, the best tool for the job. You'll find tons of failed COBOL to Java conversion projects from the late 1990's as a testament to that. It's really hard to beat COBOL on performance and even harder to find a language that's as easy to read and maintain. (Not that there isn't lots of room for improvement. It was designed to be readable, however, and it shows.) In short: It's easy to learn, easy to read and maintain, and lightning fast.
Anyhow, to answer your question: Manipulating strings is a strength that is not shared by many other languages to any significant degree, and this makes it a great fit for a broad range of applications to which python and ruby just aren't as well suited. (Working with strings in python 2.x is terrible -- even just outputting them can be troublesome due to the bizarre default behavior of 'print'. This has improved, but not much, in 3.x) I would argue that PHP is popular due in no small part to that as well (I've always thought of it as a simpler version of perl. A related note: PHP was originally written in perl.)
Boggles the mind, doesn't it?
Now we can complain about Apple causing problems with their poor standards support. (Their refusal to include support WebGL outside of iAds drives me nuts. Perhaps they feel threatened by it like they felt threatened by Flash?)
I'm not so sure about that. Microsoft has a long history of killing products and platforms.
XNA, so I hear, is a recent victim. There have also been quite a few rumors about the impending demise of .NET for a little over a year now. A quick google search will turn up a host of other examples both old and new. The point, of course, is that they're no more stable now than they've been in the past.
No trap. That's why I wrote "It's not a trick question".
I was hoping someone would point out the difference between knowledge and belief -- a distinction that's often missed by the average internet atheist, leading to some hilariously misinformed comments. (One of my favorites is the "lack of belief in any gods" vs "believe that no gods exist" schtick. That one's funny because they're clearly trying really hard, yet failing so absolutely.) I'm not usually one for schadenfreude, but that particular crowd has spread so much misinformation about science and related topics that I can't help but enjoy seeing them flail.
Ha!
Sorry, that's premature.
If you can accurately define both of the terms (atheist and agnostic) I'll retract my "Ha!". (It's not a trick question, it's really quite simple. In my experience, however, people who write, well, what you wrote above don't have the faintest idea what either term means.)
You cannot be a Jedi as it is an entirely fictional belief system.
I didn't realize there was a way to evaluate a religion to determine its validity as a religion...
I suppose we could use the "from my ass" method for data acquisition and apply an "internet forum consensus" procedure. That's a pretty popular approach.
The alternative, I suppose, is to use the gestapo tactics you'd necessarily need to employ to assess the accuracy of census participants responses (for purposes of identifying the liars so that they may be prosecuted) to see if any of alleged Jedi are practicing. Unfortunately, that's not enough to guarantee that they're lying as they might accept the orthodoxy but not the orthopraxy. On the other hand, once you've tossed out civil liberties, why would you care about a bunch of false convictions?
Maybe you're just out to capture all the Jedi? Is lying on the census treason? Is that still a capital offense?
Wait, are you actually out to inefficiently kill all the Jedi?
Damn, you Sith are tricky bastards!
emacs? Really? Why not just go full-tween and call yourself a wiccan?
vi will still be here when you've out-grown that phase.
We'll be praying for you.
As a rule of thumb, just ignore anything with an RR<2 (200%).
Google "Relative risk"
You're wasting your time with this one. Trying to explain simple things to him is like trying to teach physics to a rabid dog.
That story really puts things in perspective, doesn't it?
Woz: A brilliant engineer and a genuinely good person.
Jobs: A liar who will happily screw over even his closest friends to make a buck.
Which one does the media celebrate?
Well the thing is with the spaces on the sides of " | " you really CAN'T get an isolation since you can't close off a box. With the gaps you can go around basically any corner and get where you want.
Ignore my last reply to that quote. I completely misinterpreted it. Sorry about that!
Anyhow, here's a JavaScript version of the program so you can see how the maze ought to look without dealing with troublesome spaces and the like.
<script>
var w = 16;
var h = 16;
var maze = document.createElement("table");
maze.style.border = "solid 1px #000";
maze.style.borderCollapse = "collapse";
maze.style.width = (w*2)+"em";
maze.style.height = (h*2)+"em";
for (var i=0; i<h; i++)
{
maze.insertRow(i);
maze.rows[i].insertCell(0);
for (var j=1; j<w; j++)
{
maze.rows[i].insertCell(j);
if (Math.round(Math.random())==1 && i<h-1)
maze.rows[i].cells[j].style.borderLeft = "solid 1px #000";
else
maze.rows[i].cells[j].style.borderBottom = "solid 1px #000";
}
}
document.body.appendChild(maze);
</script>
With a simple modification you can make the cells swap their south and west walls when you click them to see how the maze changes. It gives you a good sense of how the algorithm works:
<script>
var w = 16;
var h = 16;
var maze = document.createElement("table");
maze.style.border = "solid 1px #000";
maze.style.borderCollapse = "collapse";
maze.style.width = (w*2)+"em";
maze.style.height = (h*2)+"em";
for (var i=0; i<h; i++)
{
maze.insertRow(i);
maze.rows[i].insertCell(0);
for (var j=1; j<w; j++)
{
maze.rows[i].insertCell(j);
if (i<h-1)
maze.rows[i].cells[j].onclick = function() {
var t = this.style.borderLeft;
Here you go:
#include <stdio.h>
int main(int argc,const char* argv[]){
int h, w, i, j;
h = w = atoi(argv[1]);
srand(time(NULL));
for(i=0 ;i<w; i++)
printf(" __");
printf("\n");
for(i=0; i<h-1; i++){ // two spaces // two spaces
printf("| ");
for(j=0; j<w-1; j++)
rand()%2==1?printf(" __"):printf("| ");
printf("|\n");
}
printf("|");
for(i=0; i<w-1; i++)
printf("__ ");
printf("__|\n");
return 0;
}
A space got filtered out on line 80 and 100 -- it should be in both cases "[pipe][space][space]"
Well the thing is with the spaces on the sides of " | " you really CAN'T get an isolation since you can't close off a box. With the gaps you can go around basically any corner and get where you want.
It's the best you can do with underscores, pipes, and spaces :) Try out the working program and you'll get a good sense of how it's supposed to be.
If you want, I can make a javascript version so that it looks nicer. Just ask and I'll post some code for you.
I was thinking about that and wondering how a randomly generated maze could have such attributes such as no loops or isolations, I gave it a try...
A Binary Tree Maze is just the easiest kind to make. It doesn't make the best kind of maze, as you'll see, but it meets all the criteria for a perfect maze. There are lots of other interesting algorithms that will let you randomly generate a maze with those properties -- and MUCH better results. My favorite is Eller's Algorithm -- you should give it a look.
Here's the reality that no one wants to talk about: Money DOESN'T buy happiness; it buys freedom. Smart people have no problem turning that freedom into happiness.
What a lovely platitude.
I won't argue that money can offer freedom (in some circumstances). I should note, however, that it can enslave just as easily.
Also, don't overlook the fact that you can trade money for freedom. You can, for example, accept a job at a lower salary that offers you more freedom than a different job at a higher salary. In that same sense, money can "buy" happiness as well -- in the earlier example of taking a lower-paying job that you enjoy over a higher-paying job that you dislike.
Only poor people say things like this.
Poor people would say: "Only wealthy say things like this. It's easy to say money doesn't matter when you're loaded." It's just empty rhetoric in both cases. Let's not pretend it's insightful in any way.
People with money never do, because they recognize that it's an utterly false dichotomy.
See above. Also, where did you come up with the bizarre idea that this was a true dichotomy? That wasn't implied by me or the parent.
(Also, I can't help but notice that the income range you include starts at $60K at the low end. Not exactly a barista salary.)
What do I know about the salary of baristas? Thankfully, not much. Though thanks to you, I now know that they likely make less than $60k/year. (That's crazy, isn't it? How can they afford all of that new Apple stuff every year?!)
This is all off-topic, but it's been fun.
Maybe people should plan ahead a bit better?
When I finished grad school, I had a whopping $2500 in debt remaining. The comments here are loaded with similar stories.
The college graduate drowning in debt is no different than the irresponsible 20 something with too many credit cards, the young couple who bought a house they couldn't afford, or the line-cook with a sports car.
This is the (poor) thought process:
Step 1: Go to school. (Associates degree in Criminal Justice. I freakin' love CSI and similarly themed programs!)
Step 2: Enjoy glamorous independent lifestyle!
They made bad financial decisions. They did not plan for the future -- they indulged in fantasy.
Don't get me wrong, a little escapism isn't necessarily a bad thing. A dollar for a lottery ticket or a quarter for a round of space invaders is harmless and could even be healthy. Dropping $100k to buy a failing restaurant with dreams of making millions reopening it as "La Petite Chateau" (the best high-brow coffee shop to hit your small working-class town in Iowa) is neither harmless nor healthy.
I should note that an education is never a poor investment. The trick is to plan ahead so that you're not being crushed by overwhelming debt afterward. If you're just starting out, pickup as many inexpensive undergrad credits as you can from, for example, a local community college. Undergraduate degrees aren't especially important, so don't be ashamed to finish your first four-years at a state school. You go to Cornell for the great connections, not because you'll receive a better education.
If possible, work while you're in school and start paying down those loans. You'll be amazed at what a difference that will make. It doesn't matter if it takes you an extra year or two to finish your degree -- no one will notice or care -- and it sure beats a decades worth of crushing debt!
You're not allowed to play the "money doesn't matter" card when the whole point is discussing taking out mortgage sized loans for overpriced tuition based on lies about the job market.
Something happened to me last week. I didn't buy a handy kitchen appliance I saw in a television ad. The commercial told me that said product would make a myriad of common kitchen tasks "a breeze", how simple clean-up would become, and how I could get a second one free, just by paying separate shipping and processing. You know what? I didn't believe it. I thought the the commercial was misleading. I exercised my judgement and concluded that such a purchase would be unwise. Even though supplies were limited and I had to act now, I took the time to think about the product and how it would ultimately benefit me before hastily dialing that bright-yellow toll-free number shown at the bottom of the screen. I'm now still in possession of that 19.95 + 7.95 s/h.
Neat trick, eh? You don't have to blindly believe claims made by anyone trying to sell you a product or service.
See, If you plan ahead and make good financial decisions -- that's reality-based decisions, not delusional, fantasy-based, decisions -- you can "play that card".
Yes, money doesn't really matter. I'll take happiness over money any day of the week. All that matters is that you can provide a comfortable life for you and your family. A $60k/year job that you love is easily a better pick than a $120k/year job that you hate.
Translation: "I'm super-smart and everyone I work with is a drooling moron compared to me. They can offer me nothing that I haven't already considered and likely rejected. Everyone is wrong and should listen to me. I know best, after all. I'm a specialist."
Folks, this is what happens when you "Just Say No" to a college education. The autodidact with an over-inflated sense of self-worth and a penchant for misanthropy.
Only if the person you're listening to is fredpardo.
Well said. You've elucidated the difference between 'learning a trade' and 'getting an education' far more clearly that I would have managed.
The semicolon statement terminator never existed.
True.
In BASIC, the semicolon is a statement separator, not a terminator.
False.
Colons separate statements in, well, every dialect I can remember using. IIRC it's also part of ANSI Standard BASIC.