<abstr4ct>
the idea is to have the ruby script generate the html... but it seems to be doing my content, then the html. not good.
randym has joined #ruby-lang
lsegal has joined #ruby-lang
Aiur has joined #ruby-lang
jgoss has joined #ruby-lang
jgoss has quit [Changing host]
jgoss has joined #ruby-lang
ritek has joined #ruby-lang
apeiros_ has joined #ruby-lang
S1kx has quit [Quit: Leaving]
apeiros_ has quit [Ping timeout: 246 seconds]
piisalie has joined #ruby-lang
wmoxam has quit [Ping timeout: 246 seconds]
<rking>
yorickpeterse: (pong)
wmoxam has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
grandy has joined #ruby-lang
fosky has quit [Remote host closed the connection]
fosky has joined #ruby-lang
thufir_ has joined #ruby-lang
<TheNotary>
abstr4ct: I'm not too familiar with ruby's CGI stuff, but I'm curious what leads you to using ruby outside of a framework like camp/ sinatra/ rails/ etc and all that lovely ActiveRecord stuff?
chimkan has joined #ruby-lang
wmoxam has quit [Ping timeout: 256 seconds]
Domon has joined #ruby-lang
<lianj>
judging by indentation he doesn't know about them
<r0bglees0n>
id just use sinatra & a ERB view for that.
<TheNotary>
yeah, that indentation really hurts, I have to open a misc text editor called 'medit' to make any sense of it. I think his problem is his use of the 'puts' command. It's sending text directly out at the time the puts command is processed. Maybe if he get's rid of the puts and makes it a 'return' it will work. I don't know how to test that code exactly though.
Xzyx987X has quit [Ping timeout: 256 seconds]
sush24 has joined #ruby-lang
Xzyx987X has joined #ruby-lang
pygmael has joined #ruby-lang
intellitech has joined #ruby-lang
retro|cz has quit [Ping timeout: 256 seconds]
<abstr4ct>
thenotary: all of my noobness leads me here...
retro|cz has joined #ruby-lang
<abstr4ct>
my goal seems simple enough, i thought i could get away without all the frills of rails...
<TheNotary>
k, you should google "sinatra", or even "camp" with respect to 'ruby' of course.
<TheNotary>
are you coming from another language like PHP?
norplr has joined #ruby-lang
<TheNotary>
or c++
<lianj>
TheNotary: camp is in camping framework?
<abstr4ct>
i am not a programmer by trade, this is just a small fun project for me to learn a bit of ruby. I am however not new to sysadmining....
<TheNotary>
what ever the one _why wrote is
Xzyx987X has quit [Ping timeout: 252 seconds]
Xzyx987X has joined #ruby-lang
<abstr4ct>
forget my indentation, it is bad.... it is not final code...
<abstr4ct>
i just want to do a loop in the cgi creation proccess, but i fail hard
<TheNotary>
ah, I see where you're coming from now abstr4ct.
<TheNotary>
I commented out all the references to your mysql database so I could focus on just the CGI aspect of things
aef_ has joined #ruby-lang
<TheNotary>
notice line #16 If I want more things in the body, I need to have the "+" at the end of the line. That's like making a nice big long string, you know? It could all be on the same line if you wanted, but it wouldn't look as nice.
<TheNotary>
oh wait... I didn't finish my investigation...
<TheNotary>
the loop, lol 1 sec
pygmael has quit [Quit: pygmael]
Xzyx987X has quit [Ping timeout: 252 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
<eval-in>
freedrull => /tmp/execpad-110219018b67/source-110219018b67:2:in `<main>': undefined local variable or method `a' for main:Object (NameError) (http://eval.in/14141)
<Technodrome>
how often do you guys write class methods vs instance?
mytrile has joined #ruby-lang
<Technodrome>
kinda stupid question, but sometimes i just don't see the need to write a class method, even though technically you could write it as a class method as well
apeiros_ has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
francisfish has quit [Ping timeout: 240 seconds]
dmoctezuma has joined #ruby-lang
ritek has quit [Ping timeout: 245 seconds]
kain has joined #ruby-lang
Nisstyre-laptop has quit [Ping timeout: 260 seconds]
wudofyr has quit [Remote host closed the connection]
faces has quit [Ping timeout: 252 seconds]
wudofyr has joined #ruby-lang
face has joined #ruby-lang
Axsuul has quit [Ping timeout: 252 seconds]
Mon_Ouie has joined #ruby-lang
amerine has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
maxmanders has joined #ruby-lang
thufir_ has joined #ruby-lang
maxmanders has quit [Ping timeout: 240 seconds]
maxmanders has joined #ruby-lang
retro|cz has quit [Ping timeout: 256 seconds]
retro|cz has joined #ruby-lang
workmad3 has joined #ruby-lang
Boohbah has quit [Ping timeout: 258 seconds]
kirin` has quit [Ping timeout: 255 seconds]
Traz has joined #ruby-lang
Traz has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
Aiur has joined #ruby-lang
retro|cz has quit [Ping timeout: 255 seconds]
retro|cz has joined #ruby-lang
drumond1_ has joined #ruby-lang
drumond19 has quit [Ping timeout: 258 seconds]
nXqd has quit [Ping timeout: 246 seconds]
nXqd has joined #ruby-lang
postmodern has quit [Quit: Leaving]
My_Hearing has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 252 seconds]
<rue>
Then don’t?
noop has quit [Ping timeout: 245 seconds]
<Technodrome>
rue: was just a question
<rue>
That’s basically how you decide :P
<Technodrome>
i mean i guess any method that doesn't operate on the attributes of that instance themselves *could* be a class method, but sometimes if its deals with something relating to the instance, i don't see much harm in just adding an instance method
fosky has quit [Remote host closed the connection]
baba has quit [Quit: WeeChat 0.4.0]
baba has joined #ruby-lang
retro|cz has quit [Ping timeout: 245 seconds]
retro|cz has joined #ruby-lang
devoper has joined #ruby-lang
noop has joined #ruby-lang
retro|cz has quit [Ping timeout: 245 seconds]
Guedes0 has left #ruby-lang [#ruby-lang]
retro|cz has joined #ruby-lang
soknee has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
dmoctezuma has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
drumond1_ has quit [Remote host closed the connection]
drumond19 has joined #ruby-lang
charliesome has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby-lang
thufir_ has quit [Quit: Leaving.]
kirin` has joined #ruby-lang
noop has quit [Ping timeout: 245 seconds]
kirin` has quit [Ping timeout: 256 seconds]
kirin` has joined #ruby-lang
jonahR has quit [Quit: jonahR]
tonni has quit [Remote host closed the connection]
tonni has joined #ruby-lang
dkannan has joined #ruby-lang
kirin` has quit [Ping timeout: 240 seconds]
Aiur has quit [Read error: Connection reset by peer]
Aiur has joined #ruby-lang
kirin` has joined #ruby-lang
badeball_ is now known as badeball
noop has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
kirin` has quit [Ping timeout: 255 seconds]
kirin` has joined #ruby-lang
drumond19 has quit [Remote host closed the connection]
mbj has joined #ruby-lang
kirin` has quit [Ping timeout: 246 seconds]
kirin` has joined #ruby-lang
kirin` has quit [Ping timeout: 252 seconds]
Domon has quit [Remote host closed the connection]
kirin` has joined #ruby-lang
dkannan_ has joined #ruby-lang
mrfelix has joined #ruby-lang
sush24 has joined #ruby-lang
benanne has joined #ruby-lang
francisfish has joined #ruby-lang
KU0N has joined #ruby-lang
dkannan has quit [Ping timeout: 240 seconds]
dkannan_ is now known as dkannan
kirin` has quit [Ping timeout: 260 seconds]
kirin` has joined #ruby-lang
MaddinXx has joined #ruby-lang
kirin` has quit [Ping timeout: 240 seconds]
kirin` has joined #ruby-lang
nkr has joined #ruby-lang
thone_ has joined #ruby-lang
Wardrop has quit [Quit: Wardrop]
Wardrop has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby-lang
thone has quit [Ping timeout: 256 seconds]
kirin` has quit [Ping timeout: 245 seconds]
soknee has quit [Quit: Leaving.]
<rue>
Technodrome: It’s better to default to instance methods
kirin` has joined #ruby-lang
sepp2k has joined #ruby-lang
<Technodrome>
rue: yeah
<Technodrome>
you know ruby is kinda like smalltalk in multiple ways, and in one way is, you don't really have to know it to use it, hence why i spent some time learning a few better ways of doing things
<rking>
Actually, the coffee/ dir has a lint one in addition to its normal one.
<yorickpeterse>
hmm
<rking>
:help errorformat from within vim
<yorickpeterse>
ta
<yorickpeterse>
I'll take a look at that to see if I can make it easier to intergrate it with syntastic
toretore has joined #ruby-lang
<rking>
Np. =) One thing I'm not sure about is if they have a 3rd or Nth "bucket". Currently it handles Errors and Warns, I wonder if it could do more.
judofyr has joined #ruby-lang
kirin` has quit [Ping timeout: 260 seconds]
<yorickpeterse>
still a lot of work to be done but once I finish re-writing the definition generator (currently used for core/stdlib) I'll probably just release a new version so that people can play with it
<yorickpeterse>
with a big notice "EXPECT FALSE POSITIVES!"
kirin` has joined #ruby-lang
<lewis1711>
what's the nicest way to define a private method on a single instance of an object? ie the private equivalant of "def some_instnace.foo ..."
dustint has joined #ruby-lang
kirin` has quit [Ping timeout: 252 seconds]
<rking>
lewis1711: I'm curious: Why do you want that?
kirin` has joined #ruby-lang
wmoxam has joined #ruby-lang
<lewis1711>
rking: I always make helper methods privage
sailias has joined #ruby-lang
<lewis1711>
private
<rking>
lewis1711: I always try to find a better place for methods I want to make private. =)
<rking>
Sort of like how a comment is valid, but a smell that there's some other refactoring missing, I generally view private methods as an indicator that I don't have some other object that would have a public method instead.
<m4t->
sounds hacky to me too, but inheritance from the instance and then privat'ing it could work?
<m4t->
class << your_instance
<m4t->
private foo
<m4t->
end
<m4t->
?
kirin` has quit [Ping timeout: 256 seconds]
kirin` has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
<rking>
This also does it: x.instance_eval do private; def prv; puts 'hi' end end
<rking>
But it still sounds really iffy. =)
TheNotary has quit [Ping timeout: 252 seconds]
<lewis1711>
yes but abusing the dynamicness of ruby is half the fun surely
<lewis1711>
rking: why do you think making another object with public methods is better than having private helper methods?
kirin` has quit [Ping timeout: 245 seconds]
<rking>
lewis1711: I've just found that it's normally the right organization.
<rking>
If there's an object that truly has a certain responsibility, then why is that responsibility private?
arooni-mobile has joined #ruby-lang
kirin` has joined #ruby-lang
<lewis1711>
I generally use private methods when the public method is too long. I don't feel like the outside world needs know about them
chimkan_ has left #ruby-lang [#ruby-lang]
chrismar035 has joined #ruby-lang
<rking>
lewis1711: Do you have an example you can gist?
<lewis1711>
to me current_forecast and extended_forecast should be private methods, rather internal like that
andrea93 has quit [Killed (idoru (Spam is off topic on freenode.))]
kirin` has joined #ruby-lang
<rking>
So what is the "one responsibility" of a WeatherUnderground object?
<lewis1711>
to search a page, format the info I want, and print it nicely. I guess that's 3 ;)
Gaelan has joined #ruby-lang
<rking>
Exactly. =)
vlad_starkov has joined #ruby-lang
<rking>
Not like a "drop everything and fix this" smell, but definitely one I try to heed.
<lewis1711>
so you would make a new object for each of those tasks? isn't that a bit overboard?
kirin` has quit [Ping timeout: 240 seconds]
Gaelan has quit [Remote host closed the connection]
solars has quit [Ping timeout: 252 seconds]
kirin` has joined #ruby-lang
<rking>
Which way I'd go depends on many things — for example, are there other patterns like this in the system? E.g. is there another Weather service that gets handled in a different way?
<rking>
Or is there another service of another kind altogether?
tcopp has joined #ruby-lang
<lewis1711>
rking: well I am just finishing this program up. if you're still around I'll gist it. the reason I am so curious about your views is that I have heard the notion before, that private methods are a sign of poor design, but never had it well substantiated
ruby-lang166 has joined #ruby-lang
<lewis1711>
still around when it's finished, I mean
<rking>
Sure thing. =)
<rking>
Does it have tests?
kirin` has quit [Ping timeout: 245 seconds]
benwoody has left #ruby-lang [#ruby-lang]
rsl has quit [Ping timeout: 245 seconds]
kirin` has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
retro|cz has quit [Ping timeout: 252 seconds]
heftig has quit [Quit: Quitting]
benwoody has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
ruby-lang166 has quit [Ping timeout: 245 seconds]
rsl has joined #ruby-lang
glebm has joined #ruby-lang
imperator has joined #ruby-lang
dhruvasagar has joined #ruby-lang
kirin` has quit [Ping timeout: 256 seconds]
semajs has quit [Ping timeout: 245 seconds]
heftig has joined #ruby-lang
kirin` has joined #ruby-lang
Gaelan has joined #ruby-lang
snafoo has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 255 seconds]
kirin` has quit [Ping timeout: 256 seconds]
kirin` has joined #ruby-lang
willdrew has joined #ruby-lang
chessguy has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
kirin` has quit [Ping timeout: 245 seconds]
chessguy has quit [Ping timeout: 245 seconds]
kirin` has joined #ruby-lang
Gaelan has joined #ruby-lang
thebastl has quit [Read error: Operation timed out]
Gaelan has quit [Ping timeout: 256 seconds]
kirin` has quit [Ping timeout: 260 seconds]
dkannan has quit [Quit: dkannan]
kirin` has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
cout_ is now known as cout
kirin` has joined #ruby-lang
mrfelix has joined #ruby-lang
joast has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
maxmanders has joined #ruby-lang
outoftime has joined #ruby-lang
wizonesolutions has quit [Ping timeout: 240 seconds]
sonots has joined #ruby-lang
wizonesolutions has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
judofyr has quit [Read error: Connection reset by peer]
judofyr has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<sepp2k>
llaskin: If a has a reference to an object of class foo, you can. Or if the object that you call a on is an instance of class foo (because foo includes bar or you extended a foo object with bar).
<sepp2k>
Otherwise, no.
<llaskin>
sepp2k: but a is inside a moduel which is inside class Foo
<llaskin>
so wouldn't I end up in an endless loop somehow?
carloslopes has quit [Remote host closed the connection]
<sepp2k>
I don't see how you would.
gregmore_ has joined #ruby-lang
sonots has quit [Remote host closed the connection]
<havenwood>
llaskin: I can't tell what you mean from the pseudo code. Are you trying to call ::Foo.new.a from Bar?
maxmanders has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby-lang
srbaker has joined #ruby-lang
srbaker has quit [Client Quit]
dhruvasagar has joined #ruby-lang
<cored>
hello all
<cored>
question regarding Gemfile, why if I specified a version in a gem pointing to a github repository if I made the first gem a dependency of another one the version of the gem that's get installed is the one on rubygems not the one inside the github repo?
retro|cz has joined #ruby-lang
<cored>
does it means that I have to specified the github version gem inside the last gem also?
<llaskin>
havenwood: thanks that worked
<yxhuvud>
cored: I'd assume that bundler isn't smart enough to figure out what revision to check out and that you have to figure that out by yourself if you need to use a git based gem.
pygmael has quit [Ping timeout: 256 seconds]
srbaker has joined #ruby-lang
maxmanders has joined #ruby-lang
<cored>
yxhuvud: I see
tylersmith has quit [Quit: tylersmith]
<cored>
I thought that the correct logic, was to install the first dependency and going up from there
<yxhuvud>
I don't really see the reason for why you'd want that though. the gem dependencies should be authoritative.
<cored>
hm
semajs has quit [Ping timeout: 257 seconds]
<cored>
because there's a fork for a particular branch that have the code that I want/need the main version doesn't have it yet
mrfelix has joined #ruby-lang
srbaker has quit [Ping timeout: 264 seconds]
mistym has quit [Ping timeout: 276 seconds]
__butch__ has joined #ruby-lang
amerine has joined #ruby-lang
sonots has joined #ruby-lang
mistym has joined #ruby-lang
io_syl has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
lewis1711 has quit [Remote host closed the connection]
__butch__ has quit [Ping timeout: 256 seconds]
chimkan has joined #ruby-lang
carloslopes has joined #ruby-lang
retro|cz has quit [Ping timeout: 272 seconds]
benanne has quit [Quit: kbai]
mistym has quit [Ping timeout: 272 seconds]
sush24 has quit [Ping timeout: 240 seconds]
__butch__ has joined #ruby-lang
My_Hearing is now known as Mon_Ouie
tbuehlmann has joined #ruby-lang
sush24 has joined #ruby-lang
runeb has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
mistym has joined #ruby-lang
runeb has quit [Remote host closed the connection]
<whitequark>
it needs to have *perfect* diagnostics. character for character correct.
__butch__ has joined #ruby-lang
<mbj>
whitequark: The rbx ast with 181 (last time I counted) ast nodes is aligned to the needs of the bytecode emitter. I expect to_source will be greatly simplified when based on the parsers ast.
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
pbjorklund has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
<whitequark>
mbj: I definitely plan to have a RubyParser compatibility module and maybe, just maybe an rbx compatibility module.
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
<whitequark>
maybe we'll even be able replace rbx's current C parser, with the help of dbussink :)
pr0ton has joined #ruby-lang
techlife has joined #ruby-lang
<whitequark>
I heard ruby_parser was evaluated for that but failed... I'm not surprised honestly
techlife has quit [Max SendQ exceeded]
<whitequark>
apeiros_: please +b techlife
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
<mbj>
whitequark: I'd love to help porting the parser to rbx. I have far more experience consuming asts than parsing them ;)
<whitequark>
mbj: furnace-ast is a result of quite a long struggle with a mutable, quirky AST format
<whitequark>
I also plan to split it into its own gem, to decouple it with hardcore SSA stuff in furnace
techlife has joined #ruby-lang
<mbj>
whitequark: +1
apeiros_ has quit [Remote host closed the connection]
<mbj>
whitequark: I have some small style/documentation comments.
thebastl has quit [Remote host closed the connection]
<mbj>
whitequark: Doesnt rbx have a chicken egg problem if the parser/lexer callbacks are in ruby?
<whitequark>
mbj: I think it's bootstrapped with bytecode
<whitequark>
so we can compile lexer/parser to bytecode and just load it that way
<whitequark>
mbj: what style/docs comments?
<mbj>
whitequark: Ahh yeah. Forgot.
<mbj>
whitequark: Forking and PRing currently.
Technodrome has quit [Quit: Technodrome]
mrsolo has quit [Quit: This computer has gone to sleep]
mrsolo has joined #ruby-lang
Technodrome has joined #ruby-lang
dustint has quit [Ping timeout: 246 seconds]
MaddinXx_ has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
Voker57 has quit [Read error: Connection reset by peer]
My_Hearing has joined #ruby-lang
Mon_Ouie has quit [Disconnected by services]
My_Hearing is now known as Mon_Ouie
cjs226 has joined #ruby-lang
xxaM has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
cjs226 has quit [Client Quit]
Gaelan has joined #ruby-lang
benanne has joined #ruby-lang
<mbj>
whitequark: I love your foundry project!
<whitequark>
:3 thanks
<mbj>
whitequark: You have escape analysis, yeah.
lewis1711 has joined #ruby-lang
<whitequark>
mbj: btw, your suggested fix with dup won't work
<mbj>
whitequark: interesting, I have to lookup what adamantium did. What problems do you have?
<lewis1711>
say I have a strng with a number in it. what would be the best way to take that string, and get a new string back with the number multiplied by say two?
<whitequark>
mbj: I'll better show with a commit
<whitequark>
mbj: e65fdf4 that would be.
<drbrain>
lewis1711: see Kernel#Integer and Numeric#to_s
<mbj>
whitequark: I dont think this is needed. Why dont call "self.class.new(new_type, new_children, new_properties)" ?
<whitequark>
mbj: remember: metadata
<whitequark>
is represented by instance variables
<whitequark>
user-defined ones.
<mbj>
whitequark: thinking...
<mbj>
whitequark: It is a littlebit harder as the solution should fit in a ruby implementation.
<whitequark>
mbj: I don't think we need an enumerator for metadata. Actually, you are encouraged to override the constructor with your own implementation which explicitly sets the @vars
<mbj>
whitequark: This constrains most of my "refactor to $foo" ideas ;)
<lewis1711>
drbrain: say the string "3 cats" => "6 cats". I was thinking there might be some gsub trick
<whitequark>
also note that AST::Nodes should have as little runtime overhead as possible. No hashes :)
<lewis1711>
think I saw it on a tutorial for mechanize somewhere
<drbrain>
mechanize doesn't use open-uri
ddd has joined #ruby-lang
<lewis1711>
yeah, removed it
matled has quit [Remote host closed the connection]
matled has joined #ruby-lang
lsumner has joined #ruby-lang
alessio_rocco has quit [Quit: Lost terminal]
<drbrain>
your def WeatherChannel.report and so on is …
<drbrain>
interesting
techlife has joined #ruby-lang
<lewis1711>
Yes, I am not sure about the structure of the thing
<lewis1711>
do you have a better idea?
<drbrain>
if you're just going to have it be in this script, its fine
matled has quit [Remote host closed the connection]
<drbrain>
otherwise I'd make a WeatherReport class and have def weather_underground; def weather_channel, etc
msch has quit [Ping timeout: 256 seconds]
<lewis1711>
makes sense
<lewis1711>
this little exercise has really made me hate weather.com. for it's weird html layout
soknee has joined #ruby-lang
Guest85414 has quit [Ping timeout: 256 seconds]
wang has quit [Ping timeout: 256 seconds]
matled has joined #ruby-lang
<lewis1711>
ugh, accuweather auto-converts to fahrenheit when you ask about an american location. oh well, works fine for my country lol
wang has joined #ruby-lang
Boohbah has joined #ruby-lang
<TheNotary>
I recently wrote a unit test that I have mixed feelings about. It was handy for TDD, but now that development is complete, if the method gets refactored/moved the person doing the refactoring will have to keep coming back and changing every reference to the method. Is there a pretty way to dry it up so they would only need to change one line if they moved the method from say one module into a class?
<drbrain>
TheNotary: this unit test is just fine as it is
vbatts has quit [*.net *.split]
<TheNotary>
what about if I move the #parse_youtube_id(url) method directly into the class which utilizes it? I'm thinking that's the most logical way to represent the code.. but come to think of it, i'm not even sure how to do a thorough unit test on an instance method
<rking>
lewis1711: This is really interesting.
<rking>
I'm not sure how/if to critique it. =)
<drbrain>
TheNotary: then you move the test to the appropriate location as well
<TheNotary>
hmm
eban has quit [Ping timeout: 256 seconds]
<drbrain>
TheNotary: while I'm developing new features it's quite common for me to move or rename the method a couple times until I'm happy that its name and location make sense
eban has joined #ruby-lang
lsumner has quit [Remote host closed the connection]
<lewis1711>
rking: interesting? heh in what way?
<TheNotary>
k, thats good to hear, thanks
<rking>
lewis1711: The way it does pretty much everything. How it uses those constants kind of like class names, but they're just the result of link.click, etc.
<rking>
lewis1711: What other programming langs do you know?
<lewis1711>
rking: C, Java, scheme/racket, haskell. for a given value of "know" :)
ivanoats has joined #ruby-lang
idkazuma has joined #ruby-lang
chao has joined #ruby-lang
<rking>
lewis1711: Well, you basically have some rather nonstandard Ruby code, here. You've managed to organize the 6 major blocks of code (the path walking for all 3 pairs of current and extended forecasts), plus the before/after preambles.
ivanoats has quit [Remote host closed the connection]
<rking>
Also how it uses Google to first search... just a bouquet of odd things throughout. =)
jstemmer has quit [Ping timeout: 256 seconds]
<drbrain>
rking: I wouldn't say there's anything particularly wrong with it, just that it's unusual
<lewis1711>
haha yeah. I originally searched each site individually, but it got hard to synch things up (say searching for somewhere like "Springfield" or "Belfast" which could be any number of places in the world)
jstemmer has joined #ruby-lang
chao_ has quit [Ping timeout: 255 seconds]
<rking>
drbrain: Yeah. Kinda cool in some ways.
<TheNotary>
drbrain: that paper and c2.com are great! Thanks for the link