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

09-10-2013 , 04:53 AM
Quote:
Originally Posted by tyler_cracker
use apache like god intended?
Heh Apache.

I've broken down and used it a few times on cloud servers recently.

Took a little bit to adapt how to tune it vs the lighttpd tuning I'm used to, but ehh. I guess I'm old now and just don't care anymore.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 12:00 PM
lessee...

hci = human computer interaction.

if you're basing your studies, especially graduate studies, on keywords in job searches, you are doing so many things wrong. study what you find interesting and if you are any good the money will follow. (if you are not any good, no specialty will make up for that, so just save $100k and go work for a helpdesk for a few years instead.)

"using git for deployment" sounds fine, but it also doesn't mean anything by itself. the devil is in the details.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 12:50 PM
The longest I've used skills learned in a degree was 6 years as theater technician. I used my Cobol degree for less than half of the 13 years I've been in IT. Your milage may vary, but chances are you won't be doing what you went to school for for very long.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 12:59 PM
Been a solid start to the week so far, refactored and debugged like a madman

Which brings me to the question....

I have something like
Code:
predicate0(...)
  % bunch of code ....
  predicateA(...)
  % little bit of code ....

--- snip ---
predicateA(...)
  ....
  predicateB(...)
  ....

--- snip ---
predicateB(...)
  ....
  predicateC(...)
  ....
Keeping the callstack in my head is somewhat tedious and it seems like refactoring it to

Code:
predicate0(...)
  ....
  predicateA(...)
  predicateB(...)
  predicateC(...)
  ....
Would make it easier to understand

Agree, disagree, no difference imo?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 01:01 PM
clown,

agree. SRP.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 02:05 PM
@clown - I tend to agree - but I think it depends. If A, B, and C are independent than yes.

But if B is actually required for A to be true than I don't think your refactoring makes sense since calling B should be part of determining A is true.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 06:38 PM
I'm having trouble understanding some Lisp. I get how this procedure is recursive, and that if you were to work it out with an actual value of n, it winds up evaluating to the factorial of that value, but i'm confused as to how that value is returned, when the last step, the base case, returns a value of one. It seems like the factorial value that is evaluated just gets skipped, and the procedure would forego the factorial value, and just return 1.

Code:
(define factorial
     (lambda (n)
          (if (= n 1)
               1
               (* n (factorial (- n 1))))))

Last edited by animas; 09-10-2013 at 06:45 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 06:54 PM
if n == 1: return 1
else: return n*(factorial(n-1))

1->factorial(1) -> return 1
2->factorial(2) -> return 2*factorial(1)->return 2*1
3->factorial(3) -> retrurn 3*factorial(2)->return 3*2*1

Quote:
But if B is actually required for A to be true than I don't think your refactoring makes sense since calling B should be part of determining A is true.
I guess the uglyness is that you kind of trade "easier to handle mentally" for "A,B,C must be called in the correct order"

Last edited by clowntable; 09-10-2013 at 07:03 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 06:55 PM
What programming class did you take before trying SICP?

Clowntable. That's not what is happening, really.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 07:05 PM
None, I have plans of going to college for computer science, but I don't quite have the money for it yet.

I've watched a lot of tutorials/lectures and read enough material to be familiar programming in general, it's just that I don't have any tangible programming under my belt.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 07:09 PM
factorial 5:


(* 5 (factorial 4))
(* 5 4 (factorial 3))
(* 5 4 3 (factorial 2))
(* 5 4 3 2 (factorial 1))
(* 5 4 3 2 1)
120

Nevermind, I got it now. Noob mistake on my part. I didn't see that the factorial of 1 got passed into the preceding recursive step.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 07:10 PM
It's just confusing me because n!=1 for n=0..so factorial 0 for that code would yield...kaboom :P
(I think I obviously don't (want to) speak Lisp)

Also...gamma function

Last edited by clowntable; 09-10-2013 at 07:15 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 08:24 PM
Quote:
Originally Posted by animas
factorial 5:


(* 5 (factorial 4))
(* 5 4 (factorial 3))
(* 5 4 3 (factorial 2))
(* 5 4 3 2 (factorial 1))
(* 5 4 3 2 1)
120

Nevermind, I got it now. Noob mistake on my part. I didn't see that the factorial of 1 got passed into the preceding recursive step.
This still isn't right. The function doesn't evaluate that quickly. It rolls backward the same way it rolls forward.

I don't mean offense, but it would be a good idea to take a lighter intro class before trying this out. Completing a two month course will help you a lot.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 08:26 PM
Quote:
Originally Posted by clowntable
It's just confusing me because n!=1 for n=0..so factorial 0 for that code would yield...kaboom :P
(I think I obviously don't (want to) speak Lisp)

Also...gamma function
I'm pretty sure they ask you to fix this bug in the homework.

Isn't a gamma function just a lambda function in sheep's clothing?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 08:40 PM
A gamma function is used for all other factorials (except the negative integers) i.e. reals including negative (non integer) reals
For example, (-0.5)! = sqrt(PI) = ~1.772
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2013 , 10:00 PM
Quote:
Originally Posted by clowntable
A gamma function is used for all other factorials (except the negative integers) i.e. reals including negative (non integer) reals
For example, (-0.5)! = sqrt(PI) = ~1.772
Proof by contradiction!

>> The book is titled Structure and Interpretation of Computer Programs. This means that you structure some programs and you interpret some programs, including and not limited to the lowly factorial.

In order to do this, it helps to have a bare-bones language, In this light, it is a bit unfair to compare your higher-level language with Scheme. Scheme is a minimal language with the sole intent of teaching you how to roll your own functions and data structures, therefore Scheme would not include factorial, hash-maps, loops, or anything else that is included in higher level languages.

This doesn't mean Scheme is a particularly good language, but in the parameters of the book, there really isn't anything better. In fact, they were originally looking to use Prolog for the book, but they had to create their own language to express everything they wanted to.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-11-2013 , 12:04 AM
How to set up multiple sites on DO.

The instructions are in nginx. Eh, I'll just use nginx and deploy with a private git since the docs they have on both of these topics are pretty good and fml if I'm going to search the entire internet for more information. Just go with the flow, you know?

tyler_cracker, I recall you said something to Gullanian about "knowing when you need a sysadmin." I think I should be taking this advice right about now.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-11-2013 , 03:09 AM
Quote:
Originally Posted by daveT
How to set up multiple sites on DO.

The instructions are in nginx. Eh, I'll just use nginx and deploy with a private git since the docs they have on both of these topics are pretty good and fml if I'm going to search the entire internet for more information. Just go with the flow, you know?

tyler_cracker, I recall you said something to Gullanian about "knowing when you need a sysadmin." I think I should be taking this advice right about now.
I'm sure those that took more than a cursory glance at it realized there was massive amounts of fail over the horizon.

Read the Nginx docs, and wow, Nginx is easy to use!

I didn't want to use Apache because I still have nightmares from the POM.

Gotta stay away from the DO docs.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-11-2013 , 06:11 AM
Quote:
Originally Posted by daveT
This still isn't right. The function doesn't evaluate that quickly. It rolls backward the same way it rolls forward.

I don't mean offense, but it would be a good idea to take a lighter intro class before trying this out. Completing a two month course will help you a lot.
No offense taken. Thanks for the input. I'm gonna follow your advice.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-11-2013 , 11:20 AM
dave,

you don't need a sysadmin yet.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-11-2013 , 02:07 PM
Regarding the CSS...you can just do

Code:
background-image: url(a.svg), url(b.svg);
to layer the images on top of eachother (a on b).

Refactored a ton more today, removed lots of LOC and reasoning through the code is a lot easier now. About 75% of the codebase done, rest will follow next week
Tow observations: Comments get out of synch quickly...and I often wondered what insane madman with no clue about the language wrote the code (it was me :P)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-11-2013 , 02:45 PM
Watch your browser support doing the background image that way though.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-11-2013 , 07:33 PM
If any of you node and/or angular rock stars are in the LA area (LAX-ish), or interested in relocating, my company is getting pretty desperate. Would probably be contract at first - pay is pretty good if you're qualified. It's a very laid back place to work where for the most part we all genuinely like each other.

Send me a PM if interested.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-11-2013 , 09:06 PM
Quote:
Originally Posted by suzzer99
If any of you node and/or angular rock stars are in the LA area (LAX-ish), or interested in relocating, my company is getting pretty desperate. Would probably be contract at first - pay is pretty good if you're qualified. It's a very laid back place to work where for the most part we all genuinely like each other.

Send me a PM if interested.
Not trying to be a wise ass but:

1. Pretty good pay
2. Contracting at first
3. Qualified implying to me hit the ground running with no learning curve.

Doesn't seem that desperate to me.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-11-2013 , 10:20 PM
There's Node.js and Angular Meetups. There's also that accelerator up in SF that is all JS.

I do have to agree with adios that it is sort of strange to ask someone to relocate for a contracting position.

Sort of a business question, but what happened? I recall you were bemoaning the fact that you couldn't find any JS devs in LA, resorting to outsourcing. Then the company decides to use Node and Angular, which is... wild.

This reminds me of my current job, which is really just going back into history and cleaning up all the messes that where made over the years. Oddly, I have it good compared to the other guy in my department. He sometimes asks me to do A or B to help his issue, which I flatly refuse to do (I'm not required, so settle down guys). I, and a few other people, have told him more than once to nuke everything he has and start from scratch. Yes, in this situation, this plan would save a ton of immediate work and establish a tempo for the future, ensuring consistency.

The reason the above happened is because a lot of people who had no real guidance or idea of what was happening came in and did what they felt was the best solution at the time, and yes, in many ways, it may well have been. The problem seems similar to me irt to Node or any esoteric / "new" language: protocols and best practices have not really been established because they are still trying to figure that out. Now you have Joe, Mary, George, and Martha all doing their own things and everyone of them is doing it right, or at least sort of right. After you spin through this loop, Molly will come along and have a heart attack, then Johnny will come in and tell you that you should start from scratch because this isn't workable anymore.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m