« first day (1173 days earlier)      last day (2082 days later) » 

5:36 AM
hi '
i am new to ruby...can any one suggest me , how to learn ruby
 
 
5 hours later…
10:07 AM
@Priya If you're a fast learner then perhaps learnxinyminutes.com/docs/ruby, the documentation and a lot of practice
 
10:51 AM
anyone please send me some use full tutorials about ruby....priya.lr225@gmail.com
 
 
2 hours later…
12:39 PM
After I destroyed my mint install, I'm considering going arch. Thoughts?
 
I don't really notice a big difference between distros
 
1:12 PM
hi
 
2:01 PM
@thesecretmaster I can't tell you what makes one better than the other in any practical sense. I like Debian. I dislike Ubuntu because of what seems to me the likelihood that it has spyware. I dislike Redhat because they don't grok the Linux way--they keep working to turn Linux into Windows.
But those are just opinions.
 
2:41 PM
ahve you ever used jira rest api?
 
3:13 PM
I have not.
 
3:57 PM
God I hate seg faults
 
Turn on core dumps and you can hate them more.
So you're doing C this morning?
 
I am! Last assignment for this class, write an algorithm to classify movie reviews tones, using some basic machine learning technique using Tries
 
4:17 PM
The last time I used a trie was to... I don't know what it's called... where you feed the program a bunch of text, create a trie from it, and then let it make up plausible sounding but random text based on the letter probabilities captured by the trie. Isn't that called a Markov chain or something like that? I can't trust my memory.
 
Markov chain I think
Forgot to NULL the next and child pointers on new nodes
 
What kind of fun thing are you doing? I mean, other than creating seg faults.
 
Fun things? I don't think I've done fun things since I started school
 
Haha!
 
I wrote a partial parser for starcraft 2 replays
 
That's weird, the version on github is different from what I thought it was
The site I use it for works though. This is concerning.
 
@CapricaSix hi, bot
 
But my local copy says it's up to date with github
But it's not
I am very confused
 
4:56 PM
@Cereal does git remote -v show anything interesting?
@Cereal Cool.
 
@WayneConrad The meat is in Serialized.rb, not that it's very clear what it's doing
@WayneConrad I was confused. The repo is up to date, and so is my local source, but I've managed to install an old version that the server is using
 
I'm interested in why so many method names end with a bang. Are there non-bang versions of those methods?
 
Because they increment the file pointer
Or modify the file pointer
I don't know if that's proper. Like if you ran verify_mpq!, @file is going to be in a different state when it's done
 
I would normally have methods with visible side-effects have a verbal name and no return value, and methods without side-effects have a nounal name and a return value, but I don't always do it that way. For example, Stack#pop has a side-effect, and a nounal name, but also a return value.
# Find a foo. Returns nil if not found.
def find
end

# Find a foo. Raise an error if not found.
def find!
end
That's probably my favorite use of !, right there.
 
That makes sense
 
5:05 PM
(thinking)... I guess for me, the bang makes the most sense when used to distinguish between two similar methods... one that has side-effects and one that doesn't, or one that errors and one that doesn't. I don't often use bang for a method that has no similar method that I need to distinguish.
Anyhow, I know you didn't ask about a code review, so sorry for starting one.
 
To me, a bang meant the method was going to change the object's state in some way, shape, or form.

Like if I called str.delete!(' '), that would delete all the spaces in str, changing the state of str.

But what you said makes sense. Datamapper uses bangs to signify you're saving whatever you're doing, as well as doing it.
 
datamapper?
ain't that ancient thing?
 
I think what you thought it meant is what core Ruby usually means by a bang. I don't know if Ruby invented that, or got it from Smalltalk, or what. Rails added some other meanings for !, like error vs. no-error.
 
Rails added a lot of things in general
Why write <form action="post"> when you could write <%=do_everything_for_me%>
or whatever the formatting is
 
there's a better syntax for this
 
5:18 PM
Rails changed the meaning of #id. Remember that? Object#id used to return the Ruby object ID, but then Rails overrode it to mean a model instance's primary key. Ruby had adapt and rename Object#id to Object#object_id. Which is a good thing, by the way.
 
if you use haml
 
I'm currently having a fight with scanf and printf
 
5:33 PM
@Cereal Who's winning?
 
I'm winning against printf, but scanf really isn't holding back
 
 
1 hour later…
6:39 PM
77
Q: When using the Single Responsibility Principle, what constitutes a "responsibility?"

Robert HarveyIt seems pretty clear that "Single Responsibility Principle" does not mean "only does one thing." That's what methods are for. public Interface CustomerCRUD { public void Create(Customer customer); public Customer Read(int CustomerID); public void Update(Customer customer); publ...

I'm enjoying the answers to this question.
 
Kind of common for CS stuff to be hard to explain, but if you asked anyone who knows it to do it, they all can.

Further enforces my idea that programmers have a special kind of brain.
 
I've often had trouble with SOLID, so I enjoyed a high-status member also having trouble with it.
 
 
2 hours later…

« first day (1173 days earlier)      last day (2082 days later) »