topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday September 20, 2026, 5:27 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 1066 1067 1068 1069 1070 [1071] 1072 1073 1074 1075 1076 ... 1515next
26751
Scott Hanselman writes good stuff on programming but his article today on what's so great about Ruby is good reading for people like me looking for an excuse to give Ruby a pass.  I consider these examples to be shiboleths and i find myself squarly in the camp of those who find the "Ruby Way" to be the wrong way.

A user named yesthatmcgurk left a comment on DotNetKicks where he/she said:

I must be a complete loser, because I can't see where Ruby is such hot shit. I'd love to read a story, "What you're not getting about Ruby and why its the tits."

Such a great comment that I had to get involved. One of the other commenters pointed to a post over on "Softies on Rails" that's really worth reading.

Note: Forgive the use of "the tits" in this context. "Slang Definition: A description of something you show great liking to, or greatly appreciate..." Usually not a work-friendly phrase, but perhaps pub-appropriate.

There's a simple snippet of Ruby code:

Code: Ruby [Select]
  1. def shutter_clicked
  2. if @camera.off? || @camera.memory_card_full?
  3.   return
  4. end
  5.   capture_image
  6. end

Ruby folks have their own aesthetic and sense of beauty. They would say that the Programmer's Intent is better expressed like this:

Code: Ruby [Select]
  1. def shutter_clicked
  2.   capture_image if @camera.on? && @camera.memory_available?
  3. end

These two functions identically express the Programmer's Intent and the second one expresses it better, many believe.

Guess what, i don't think the second one is better, to me it's just one more example of the perl approach that the shorter the code the better the code.  I don't believe that.  I believe clarity is often best served by writing longer blocks (and good comments).  Whenever someone shows me these kinds of statements i always show them how easy it is to properly comment/debug the longer example and not the short one.
e.g.
Code: Ruby [Select]
  1. def shutter_clicked
  2. if @camera.off? || @camera.memory_card_full?
  3.   // the camera either got turned off by mistake or is full
  4.   // TODO: write error handling and detect which problem
  5.   // for now let's just return without an error.
  6.  return
  7. end
  8.  // ok, camera is ready so let's capture the image
  9.   // TODO: make sure to reset camera state later
  10.   capture_image
  11. end


Here's another:

There are some fun one-liner comparisons though and some folks think that paying a:
Java: 
Code: Java [Select]
  1. new Date(new Date().getTime() - 20 * 60 * 1000)
Ruby:
Code: Ruby [Select]
  1. 20.minutes.ago

In this example, the elegance is a combination of how Ruby works, and a Rails library called ActiveSupport that is a Domain Specific Language that extends Ruby. There's a special satisfaction when you read a well-written novel and you go over a turn of phrase and think, "wow, what a great way to express that. That was a perfect way to describe ____," and there's no ambiguity.

This reminds me of everything that's wrong with (the often exceptional) boost libraries for C++, a love of abusing syntax and using "domain-specific" additions to the language.  Again the attraction seems to be to poetic tiny little segments of code.  If you are trying to write a 5-line haiku in code, fine.  But my experience is that when you start working on larger projects, you're better of knowing when you are calling a function or accessing a variable, and not introducing operator overloading and other fancy domain language extensions, etc.

Now of course this is just a minor part of Ruby, there are other things I don't like, and other things I do like, but Ruby, like most languages, seems to have developed a strong culture of style behind it that i don't fit into, so i'll keep looking.. Just my 2 cents.
26752
Clipboard Help+Spell / Re: Feature: include windows hotkeys?
« Last post by mouser on May 23, 2007, 07:39 PM »
yeah i really need to add that i know..
26753
Clipboard Help+Spell / Re: Configuring user tools
« Last post by mouser on May 23, 2007, 07:01 PM »
please let me know if you get it to work and if not what problems you have..
it would be nice to have a little list of tools and how to configure them somewhere, maybe start a thread for it.
26754
He didn't want to install anything on his pc to do it

the answer to that is simple: have a stern talk with him and if that fails hit him over the head with a bat and install the software yourself.  that's just silly.
26755
Living Room / Re: Define passive-aggressive
« Last post by mouser on May 23, 2007, 05:58 PM »
even better  :up:
26756
app, there are quite a few free local pc programs that do resizing.
26757
Living Room / Re: Define passive-aggressive
« Last post by mouser on May 23, 2007, 03:45 PM »
as the quote above says, most of these aren't really "passive aggressive" which is bound to confuse anyone who is interested in learning what that phrase means.

from merriam-webster:
passive-aggresive: being, marked by, or displaying behavior characterized by the expression of negative feelings, resentment, and aggression in an unassertive passive way (as through procrastination and stubbornness)

an example would be telling your roomate that you wish you had been able to get more schoolwork done but it's hard for you to concentrate when there is a lot of noise (it's *passive* aggressive because what you are really *wanting* to say to roomate is: stop playing your music so loud!).
26758
Here are some finished pictures, with my apologies to everyone who thought i should leave some natural wood.  In the end I decided that I really did want a "built-in" look where the bookcase felt like just another one of the white walls:

P1010045_port2.jpg
P1010050_port1.jpg
P1010051_land1.jpg
P1010057_corner1.jpg
P1010060_base1.jpg
P1010063_top1.jpg

ps1.
with all the trouble i went to to install "crown molding" at the top, you can barely see it (neither in pictures or in real life)!

ps2.
those funny little things you see on left+right side at waist level are speaker wires, since i plan to add some speakers at either end (i only wish i had remembered to put a power outlet on each unit).

ps3.
the very bottom left+right corners are not "covered" -- there is ethernet, power, and cable wiring accessible there.

ps4.
final dimensions: 17' long by 9' high, 12" deep at bottom, 8" deep at top.
26759
UrlSnooper / Re: URLsnooper refuses to start!
« Last post by mouser on May 23, 2007, 01:21 PM »
sounds great onerudyard -- i did discover it was localizer issue but had trouble rebuilding it with fixes, so any discoveries you found would be very welcome indeed.  you can email me (the author of url snooper) at [email protected] directly if you like.

oh, and welcome to the site  :up:

-mouser
26760
Living Room / DRAM Buyer's Guide From ExtremeTech
« Last post by mouser on May 23, 2007, 12:51 PM »
Another nice mini-article from ExtremeTech on buying memory (DDR2 or the new DDR3).  If you're anything like me you are completely mystified by all these different brands and kinds of memory chips, with all their different timings, and vast differences in price..

If anyone knows any other similar good articles on buying memory, please post as a reply.

As PC manufacturers ramp up their system offerings with DDR3 support, most of the DDR3 volume initially will go into those. We don't anticipate a rush to buy motherboards that support DDR3, but this is a good time to discuss memory and to help you plan future upgrades.

For the moment, DDR2 is still the king of the hill in memory. Sometimes, though, the sheer number of flavors of DDR2 is confusing. On top of that, there has been some variance from the JEDEC spec for memory. For example, some high-performance memory is rated at specs beyond any official JEDEC rating, and to hit those high specs, you also need to increase voltage beyond the standard. We've seen users buy memory rated at DDR2-1066, for example, who are surprised when they boot their system and find out that it's only running at DDR-667 speeds.

26761
one thing you will want to decide is: do you want user to be able to easily extract the original files, or do you want to hide them and make it behave like one exe and not have any sign of original files.  if the former, than sfx is good approach.  if the latter, then you might want to look for more specialized tools.
26762
Another lesson i have learned while painting this big bookcase:

I'd rather walk 30 miles in the snow to buy a 50 cent disposable painting sponge than use a $50 bristle paintbrush given to me by Linda Fiorentino.
26763
this seems to be what many consider the best current glue:
http://www.gorillaglue.com/home.htm

hand_half.jpg

I can vouch that it is very strong.  It swells up as it dries -- which is important to know -- that means it's quite good at fixing loose joints, but it means that if you were using it to glue 2 objects flat against each other you better use clamps.
26764
I'd like to see a farr plugin that does what ServicesCtl by OGroeger does, lets you type "services *" and shows you matching background services in windows, and their running status (green or red light icons), and lets you toggle them on and off when you click.
26765
Announce Your Software/Service/Product / Re: ServicesCtl by OGroeger
« Last post by mouser on May 23, 2007, 05:38 AM »
Indeed that looks very useful. It's also given me a nice idea for a FARR (Find and Run Robot) plugin that could list status of services and let you toggle them.
26766
Farmsteadter and my dad think alike!
They both think wood glue is the best thing since slices bread, and both came up with idea of using "dummy" books as supports.  Must be old school true woodwork lovers.
26767
General Review Discussion / Re: Review suggestions
« Last post by mouser on May 22, 2007, 09:37 PM »
yes it's so true that we need to do a much better job specifying version numbers clearly in our reviews, i agree and we will be doing that in all future reviews.
26768
I wrote a long review of thebat 2 years ago on DC:
https://www.donation...ailClient/index.html

i still love it.

but, thunderbird is getting better every day, and many of the advantages that thebat had may be implemented by thunderbird by now, i'm note sure.  try them both and see what you prefer!
26769
General Software Discussion / Re: musicIP (as a player): wow
« Last post by mouser on May 22, 2007, 04:17 PM »
um... could we have a url or is it a secret?  :huh:

(a screenshot would be nice too :)
26770
I agree that it's in a gray area, and i think it could be a bit counterproductive because i think it detracts from the people who would write a review just because they like your software.  however, it still seems pretty harmless to me in that if the only thing the writer gets is a free copy, then obviously they like the program enough to want a free copy, and the "rules" don't say anything about you not being able to say anything negative, etc.  so i stand by my view that there isn't really any incentive to say good things about the program that you don't believe, so i don't see much harm in it.  the ones that i am totally opposed to is where people get paid to say good things about a product, where there is a very strong incentive to praise something and say positive things you don't really believe.

disclaimer: i've never written a review in exchange for a free copy (or for money of course!), but i have accepted a free copy of a program after i've posted a review.
26771
Post New Requests Here / Re: Alarm When Power Cord Falls Out of Notebook
« Last post by mouser on May 22, 2007, 12:03 PM »
I think this is a great idea.

Maybe even an option to change the background desktop color or image or something based on whether you are using battery or not, to help you remember?
26772
Welcome to the site alex.

Wordzilla, I'm not sure the objection to being paid for reviews is the same as getting a free license for writing a review.

Being paid money (or equivelent) for writing a (presumably positive) review seems bad to me.  It means that people will be writing glowing reviews in order to make money.  [worst is when they don't reveal they are bing paid -- if you announce you are being paid clearly in the review it's not quite as bad].

But getting a free copy of a program you think highly of based on a review you write of it seems pretty harmless to me, since there is no motivation to write good things about a program you don't truly like (otherwise why would you want a free copy?).

At least that's my view.

Worst:  Writing a positive review for money and not disclosing it.
Most Harmless: Getting a free copy of a program you like after writing a review about it.
26773
Dr.Windows / Re: Dr.Windows Dialogs - Add Yours!
« Last post by mouser on May 21, 2007, 06:20 PM »
just make new .cfg (text) files in the Dialogs subdirectory directory.
26774
Firstly I snuck downstairs to the theatre, and stole some green lighting gel.
    * Yes - I actually do live above a theatre.
    * No - I don't wear a mask and drop chandeliers on people.

 ;D ;D ;D
26775
Living Room / Re: UK pc con (sorry, i mean repair) man captured for TV show
« Last post by mouser on May 21, 2007, 12:16 PM »
i'm wondering if this is a good tactic though. maybe it just smells of desperation when you use other businesses as a bad example to your own business.

I think it's a good idea to address the issue directly that people are concerned about being ripped off.
So I say yeah link to the videos and other pages with tips and articles on what to watch out for.
Make a point that an informed customer is something you welcome and encourage.
Make clear your real info (names, addresses, phone#) so users can make sure there are no complaints, etc.
Pages: prev1 ... 1066 1067 1068 1069 1070 [1071] 1072 1073 1074 1075 1076 ... 1515next