Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

02-23-2012 , 08:02 PM
Quote:
Originally Posted by Zurvan
So, my boss was heard to say "I'm Steve Jobs" yesterday. I'm fairly sure he wasn't entirely kidding.
Does he look like this?

** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-23-2012 , 08:08 PM
haha
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 12:58 AM
Quote:
Originally Posted by Xhad
It was a CLISP session. I don't "really" use LISP, though I have some familiarity with it.
I'll attempt to explain what I think is happening here, and see if it melds well with Practical Common Lisp (great book, btw).

Data is objects, and I think what you ended up asking is "Does 0 exist?" and the answer is, in a purely computational way, "Yes, there is some pointer to some object called '0' thus this is true."

Common Lisp also does this:

Code:
CL-USER> 10/5
2
CL-USER> 10/3
10/3
CL-USER> (+ 10/3 10/5)
16/3
CL-USER> (+ 1/10 1/10)
1/5
CL-USER> (/ 10 3)
10/3
CL-USER> (+ (/ 10 3)
	    (/ 10 5))
16/3
CL-USER> (floor (/ 10 3))
3
1/3
CL-USER> (ceiling (/ 10 3))
4
-2/3
CL-USER> (defvar x (floor (/ 10 3)))
X
CL-USER> x
3
I think all of the above is really cool.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 01:50 AM
Quote:
Originally Posted by Gullanian
Who here is from London again? I just went to the London HN meetup was very cool, hundreds of people, free beer, some good talks and Joel Spolsky gave an interesting talk as well about how in communities it's important to naturally repel people you don't want as well as attract those you do which I thought was interesting.

If anyone is around for the next one let me know can go for a pint after!
I'm in. Where on HN do they post about the meetups?

On an unrelated note, I have a refactoring problem I don't know what to do about. I have a performance sensitive depth first recursive (iterative version with a custom stack showed lower performance and was far more complex) function that traverses a tree structure. I need to do pre and post processing and among the algorithms that traverse the tree. I have more than a few different algorithms that traverse the tree and do various calculations, but the only thing they share in common (for the most part) is the actual traversal code, but it feels like an incredibly bad idea to copy and paste that among the functions. What's twisting me up is that these functions use different numbers of variables and often have different local variables that they work with. Here is a simplified representation of how the algorithms might look:

Code:
void recurse(Node &node, .....) {
//possibly calculate some local variables to be use,
// or maybe not

for (c=0;c<node.numChildren;++c) {
//various code, possibly more temporary variables 
//and either dealing with a leaf node or recursing further
}

//post processing, possibly using some of the
// temporary variables that have been modified 
//while walking the children
}
I'll also add that my traversing code is far more complex than this as I exploit some properties of my tree to place certain types of nodes/leave in certain positions in the child array.

Is there anything I can do to not repeat myself without performance penalties?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 02:25 AM
Quote:
Originally Posted by skier_5
I have more than a few different algorithms that traverse the tree and do various calculations, but the only thing they share in common (for the most part) is the actual traversal code, but it feels like an incredibly bad idea to copy and paste that among the functions. ...

Is there anything I can do to not repeat myself without performance penalties?
You can have one traversal function and you can put each "calculation functionality" into a dedicated object (one method or several for pre post processing) let those objects all implement the same interface and you call the specific interface method(s) on this object. IOW one traversal function which always calls the same methods but the objects it gets will be different. (With that you might have to pass some references that are not really needed by the specific object.)

There are a lot of other possibilities but from a design standpoint that's one of the more cleaner solutions, but dependent on what specific performance needs you have you might actually want to go a different route, but that's very dependent on your exact situation.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 03:12 AM
Quote:
Originally Posted by pablito_21
I am not a programmer but I love solving the problems from things like the spotify and ACM challenges: thinking about possible solutions, creating algorithms in text or pseudo-code, finding ways to optimize a solution, ...
I can actually write the programs as well, as I have some background in java/C/C++ from college, but as I said, I am not an experienced programmer.

I know that my forte, and also my personal preference, is towards the 'problem solving' part, and the actual programming is something where I'm at a significant disadvantage compared to 'real' programmers.

Hence my question: are there actually jobs geared towards this skillset? How would I go about finding them? For example, what kind of jobs would you be able to get into if you impress the spotify people with your solutions for their problems?

Basically, what are my options if I am a worse 'programmer' than most but a better 'thinker' than most.
Easy, just code more and improve your programming. You can teach people to program, but it's very difficult to teach people to think.

Are you able to look at a large working program and understand it? If you can, then maybe consider optimization and tuning. Although this type of work is more niche and may not provide many choices in jobs
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 03:57 AM
Quote:
Originally Posted by wull
You can have one traversal function and you can put each "calculation functionality" into a dedicated object (one method or several for pre post processing) let those objects all implement the same interface and you call the specific interface method(s) on this object. IOW one traversal function which always calls the same methods but the objects it gets will be different. (With that you might have to pass some references that are not really needed by the specific object.)
this sounds about right. the keywords your query triggered for me, skier, were "visitor pattern" and "polymorphism" -- you might start there.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 10:06 AM
Of related interest: boost bind and boost lambda.

boost bind adapts <almost anything> to fit a particular callback pattern. Useful when working with libraries.
boost lambda lets you write your callbacks inline.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 12:51 PM
Moved over to my new domain last night. Decided to purchase guy.ht (first name + initials) and move my existing pages / blog over.

It was actually a lot easier than I expected. I just copied my old virtual hosts file and changed ServerName to guy.ht, saved it as a new file, then edited my old virtual hosts file and setup a mod_rerwite redirect. Any pages that are accessed on the old domain are automatically forwarded.

Slightly annoying that for some reason, .ht domains are about 5 times the price of most over tlds, but been wanting to have a branded domain for a while so pretty happy with it.

Now I just need to update the home page which is a bit meh.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 12:58 PM
I'm moving my site over now and it's going slow lol, have to get SSL certs reissued which will be slow probably! Wish I could just copy+paste like you lol Got like 100k files as well took friggin ages to move, as well as it being hard to debug server errors when it's only 50% propogated (on RDP its propogated here in UK it's not)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 01:53 PM
Ye, moving domain is a lot easier than moving server.... and my SSL certificates are self signed.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 03:05 PM
does anyone remember a link posted here (or maybe somewhere else) a couple of months ago about a statistical package that does multi-variate correlation on a dataset?

i can't find it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 03:10 PM
I've been working a lot on my Ruby on Rails the last few weeks. God I felt like an idiot at the start (haven't done ANY programming in years/my brain is an atrophied mush), but I think I'm finally getting a handle on it. Just started building a simple 2+2esque forum just for learning.

Anyone have any good ideas of features to add that might be good for improving my knowledge of the language?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 03:27 PM
Quote:
Originally Posted by sylar
does anyone remember a link posted here (or maybe somewhere else) a couple of months ago about a statistical package that does multi-variate correlation on a dataset?

i can't find it.
R?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 03:50 PM
Quote:
Originally Posted by _dave_
R?
no i don't think it was R.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 04:16 PM
Quote:
Originally Posted by Nchabazam
Anyone have any good ideas of features to add that might be good for improving my knowledge of the language?
learn TDD methodology and/or rspec.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 04:38 PM
Quote:
Originally Posted by Nchabazam
I've been working a lot on my Ruby on Rails the last few weeks. God I felt like an idiot at the start (haven't done ANY programming in years/my brain is an atrophied mush), but I think I'm finally getting a handle on it. Just started building a simple 2+2esque forum just for learning.

Anyone have any good ideas of features to add that might be good for improving my knowledge of the language?
Don't take http://www.youtube.com/watch?v=5GpOfwbFRcs too seriously...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-24-2012 , 05:12 PM
I was trying to install VB6 on a new windows 7 machine. I have done this before but this time it was failing and google was not helping.

I made a setup log and found it was failing accessing C:\ProgramData\Microsoft\Windows\Start Menu

I have an SSD and I put ProgramData on D. I created the directory it wanted on C and the install completed. hoorah!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-25-2012 , 08:14 AM
Quote:
Originally Posted by tyler_cracker
learn TDD methodology and/or rspec.
+1 for sure, toss in some Cucumber as well

Maybe implement banning/different banlevels, moderation etc? If you haven't done so authentication of course (I like Devise) and maybe some authorization (CanCan is fairly light weight and nice imo).

Also fun to just play with compass/sass or bootstrap etc
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-25-2012 , 11:38 AM
Quote:
Originally Posted by Nchabazam
I've been working a lot on my Ruby on Rails the last few weeks. God I felt like an idiot at the start (haven't done ANY programming in years/my brain is an atrophied mush), but I think I'm finally getting a handle on it. Just started building a simple 2+2esque forum just for learning.

Anyone have any good ideas of features to add that might be good for improving my knowledge of the language?
Coursera's Software Engineering for Software as a Service class just started this recent week. This course is taught with Rails and it will cover a variety of topics including TDD (Cucumber and RSPec included), agile development, etc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-25-2012 , 01:23 PM
i don't know anything about the online version of this class, but i will say that i took cs61c from patterson back in, uh, 1999? and he's a great lecturer. dude helped invent risc and raid!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-25-2012 , 02:23 PM
Quote:
Originally Posted by Benholio
Coursera's Software Engineering for Software as a Service class just started this recent week. This course is taught with Rails and it will cover a variety of topics including TDD (Cucumber and RSPec included), agile development, etc.
i'm taking this. it seems great so far. their philosophy and priorities are exactly right imo.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-25-2012 , 03:16 PM
Lol I accidentally signed up for that one as well. Wanted to create an account but somehow got signed up..don't see an option to unsubscribe either. Only want to do the Model Thinking but I guess I'll watch the videos and maybe play along in the Rails/SaaS one
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-25-2012 , 07:40 PM
Uptodate on the lectures (Chapter 2, Episode 3). All pretty basic so far, the Amazon-SOA stuff was pretty neat.

Quote:
their philosophy and priorities are exactly right imo.
I think I agree, they seem to have chosen a good level of abstraction so far.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-26-2012 , 12:42 AM
yeah, the amazon SOA stuff was fascinating.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m