Open Side Menu Go to the Top

01-30-2013 , 08:02 PM
has anyone used any Node.js tools to track down memory leaks?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
01-31-2013 , 01:17 AM
Quote:
Originally Posted by kerowo
What problem does using lambdas solve?
Seems like most uses of them are for when you're calling a higher order function (a function that accepts a function as an argument, like map or reduce) and you want to pass along a quick, simple function.

One example where I use lambdas:

I'm trying to call an external API, and I want to pass in certain defined parameters, like for example there is a param in the API called 'url' for a particular URL.
I have a dictionary that maps parameter names to a "value function", where the value function is how to get the parameter name.

The code looks like:

Code:
def get_url():
  # execute a bunch of logic
  return blah.url()

PARAMS_DICT = { 'url': get_url,
      'param1': lambda: 55
}
so I use lambdas here for some of the super simple value functions rather than having a "def get_param1(): return 55" somewhere else in the module.

I also have used them a few times for quick partial functions. Simple example:
Code:
def divide(x,y):
  return x/y

divide_by_two = lambda x: divide(x,2)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 08:46 AM
Quote:
Originally Posted by ballin4life
Seems like most uses of them are for when you're calling a higher order function (a function that accepts a function as an argument, like map or reduce) and you want to pass along a quick, simple function.

One example where I use lambdas:

I'm trying to call an external API, and I want to pass in certain defined parameters, like for example there is a param in the API called 'url' for a particular URL.
I have a dictionary that maps parameter names to a "value function", where the value function is how to get the parameter name.

The code looks like:

Code:
def get_url():
  # execute a bunch of logic
  return blah.url()

PARAMS_DICT = { 'url': get_url,
      'param1': lambda: 55
}
so I use lambdas here for some of the super simple value functions rather than having a "def get_param1(): return 55" somewhere else in the module.

I also have used them a few times for quick partial functions. Simple example:
Code:
def divide(x,y):
  return x/y

divide_by_two = lambda x: divide(x,2)
Lambda functions apply to more than Python but yes Python is used a lot for scripting where brevity can be an asset.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 08:47 AM
Quote:
Originally Posted by Neil S
If I pay someone X dollars to deliver Y product on Z date, I don't care what days or hours are worked as long as I get Y product on Z date.
+1000000, that's all that matters.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 10:14 AM
Anyone know any good resources for learning backbone.js (or some other similar framework)?

I just did the codeschool course on it, and had been given a pretty brief intro to JS frameworks on a day where I was super hungover, but want to try to make sure I'm not picking up bad habits.

Going to try and rewrite the blackjack game I made in JS a few months ago, suppose I'll use a rails backend to store hand histories/whatnot.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 11:08 AM
Any of you guys have a personal portfolio type website? I want to build one for myself but I have zero design skills and art/design is not really something you can just learn. 99designs would be great for a small business, but is kind of expensive for a personal project.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 11:36 AM
Quote:
Originally Posted by Nchabazam
Anyone know any good resources for learning backbone.js (or some other similar framework)?

I just did the codeschool course on it, and had been given a pretty brief intro to JS frameworks on a day where I was super hungover, but want to try to make sure I'm not picking up bad habits.

Going to try and rewrite the blackjack game I made in JS a few months ago, suppose I'll use a rails backend to store hand histories/whatnot.
Bought the thoughtbot book about backbone.js on rails.

Had a guy come into the program I did for a few days to teach from thoughtbot, who was quite a ninja, so I figure it was a decent choice.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 12:21 PM
Quote:
Originally Posted by splashpot
Any of you guys have a personal portfolio type website? I want to build one for myself but I have zero design skills and art/design is not really something you can just learn. 99designs would be great for a small business, but is kind of expensive for a personal project.
99 is not great for anything but mediocrity ime
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 01:24 PM
More codecademy fun. Here are some different variable names from the same exercise:

Code:
myCheckListForm
checklistItem
checkList
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 01:38 PM
Quote:
Originally Posted by splashpot
Any of you guys have a personal portfolio type website? I want to build one for myself but I have zero design skills and art/design is not really something you can just learn. 99designs would be great for a small business, but is kind of expensive for a personal project.
Twitter Bootstrap?

What's the other one people were talking about in the thread?

Actually if anyone could make a recommend between bootstrap and that "other one" I'd be interested to hear opinions. (Paging DaveT!)

Actually while I'm at it:

I got Effective Java 2 based on the codingforinterviews site and I like it so far.

I also found this youtube channel with loads of programming whiteboard problems. I've only skimmed through a couple but as a list of problems to think about it it's a decent start.

Did you ever post that article of closjure?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 01:41 PM
Quote:
Originally Posted by Xhad
More codecademy fun. Here are some different variable names from the same exercise:

Code:
myCheckListForm
checklistItem
checkList
Gonna find out who's naughty and nice
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 02:21 PM
Quote:
Originally Posted by ballin4life
I'm trying to call an external API, and I want to pass in certain defined parameters, like for example there is a param in the API called 'url' for a particular URL.
I have a dictionary that maps parameter names to a "value function", where the value function is how to get the parameter name.

The code looks like:

Code:
def get_url():
  # execute a bunch of logic
  return blah.url()

PARAMS_DICT = { 'url': get_url,
      'param1': lambda: 55
}
so I use lambdas here for some of the super simple value functions rather than having a "def get_param1(): return 55" somewhere else in the module.
i realize you're trying to simplify to make the example digestible, but i don't understand why you would ever want to do this. a traditional getter/setter layout would be much easier to understand.

Quote:
I also have used them a few times for quick partial functions. Simple example:
Code:
def divide(x,y):
  return x/y

divide_by_two = lambda x: divide(x,2)
don't do this. use functools.partial.

Quote:
Originally Posted by adios
Lambda functions apply to more than Python but yes Python is used a lot for scripting where brevity can be an asset.
please explain. (fair warning: i've got "readability trumps all" on deck for your response.)

Quote:
Originally Posted by splashpot
Any of you guys have a personal portfolio type website? I want to build one for myself but I have zero design skills and art/design is not really something you can just learn. 99designs would be great for a small business, but is kind of expensive for a personal project.
"art/design is not really something you can just learn" is the inverse of the kind of cop-out the artsy types use: one does not simply... learn to program.

i'm assuming you're trying to show off your technical prowess with this portfolio? if so, a simple, clean design (the kind even someone with "zero design skills" could create) is all you need and looks way better than something "design-y" (read: frilly, substanceless) that you found on the internet.

iow: learn a new skill or two and don't be a bitch.

YOUR PAL,
TYLER
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 03:03 PM
I find it weird that you'd 'outsource' a significant chunk of a page meant to showcase your skills. Maybe I'm misunderstanding the purpose?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 03:19 PM
I dunno, isn't it sorta like hiring someone to illustrate the cover of a book you wrote? I can put all the pieces together, I just don't have an eye or imagination for what looks good. There is a reason web developer and web designer are different jobs.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 03:20 PM
Anyone here with virtualization experience?

I'm in the process of reinstalling my desktop box (Quadcore AMD Phenom) and the virtualization options are a tad conusing.

I've narrowed it down to Xen,KVM and VirtualBox. If I understand correctly Xen is a type 1 hypervisor and I just install my guest OS I want to run on top of that (+ I'll need a Dom/0 = quasi guest OS).
KVM is similar but the Dom/0 is basically fixed as a Linux so essentially I just install a Linux and lead the KVM modules etc and am good to go (+ some extra legwork)

VirtualBox is different since it's not as close to the bare metal but I feel like I kind of need to stick with it because Vagrant+Chef look pretty sexy and I think running multiple virtualization environments can lead to all kinds of trouble (KVM+VirtualBox for example)
I'd just install a Linux and use VirtualBox from that.

I kind of want to go with KVM though. If I install some Linux and KVM any best practices i.e. should I just use the host Linux as a normal Linux or keep it as minimal as possible and use a guest VM-Linux as my day to day Linux? That's actually the most important question TBH I can figure out the rest.
I kind of expected that there is a superlean KVM-distro that you install (i.e. kind of like the counterpart to the Xen Dom/0) and then start the host OS from there but it seems that KVM is just run on top of your regular old Redhat/Ubuntu.

Any input would be helpfull ( I have a couple of days untill my 512GB SSD arrives, I want to go all SSD for this box (currently it's 128GB+1 TB HDD hybrid) )
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 03:28 PM
ive only ever heard of running Xen, KVM, or OpenVZ on VPS web hosting, never as a desktop solution. but i havent done much research
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 03:52 PM
Given that my hardware supports it I don't see a reason why I shouldn't virtualize (performance loss doesn't seem severe enough) since I reinstall anyways.

After some research it seems like Proxmox is a good KVM-host distribution
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 05:06 PM
Quote:
Originally Posted by mindsplatter

Actually if anyone could make a recommend between bootstrap and that "other one" I'd be interested to hear opinions. (Paging DaveT!)
I haven't had much time to look at it, but basically, this is the Sass you are given (abridged):

Code:
@import "foundation/common/ratios";

// Settings file containing Foundation defaults

// Grid Settings

// $rowWidth: 1000px;
// $columnGutter: 30px;
// $totalColumns: 12;
// $mobileTotalColumns: 4;
// $blockGridElements: 12; // Highest number of block grid elements, Maximum of 24 supported

// Colors Settings

// $mainColor: #2ba6cb;
// $secondaryColor: #e9e9e9;
// $alertColor: #c60f13;
// $successColor: #5da423;
// $txtColor: #222;
// $highlightColor: #ffff99;
// $black: #000;
// $white: #fff;
// $shinyEdge: rgba(#fff, .5);
// $darkEdge: rgba(#000, .2);

// Font Settings

// $fontSmoothing: antialiased;
// $headerFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
// $headerFontWeight: bold;
// $headerFontStyle: normal;
// $headerFontColor: #222;
// $bodyFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
// $bodyFontWeight: normal;
// $bodyFontStyle: normal;
// $bodyFontColor: $txtColor;

// Text Direction Settings


// Joyride Settings

// $tipBg: rgba(0,0,0,0.8);
// $tipBgIE8: #000;
// $tipFontColor: #fff;
// $tipHeaderWeight: bold;
// $tipDefaultWidth: 300px;
// $tipBorderRadius: 4px;
// $tipPadding: 18px 20px 24px;
// $tipNubSize: 14px;
// $tipFontSize: 14px;
// $tipTimerWidth: 50px;
// $tipTimerHeight: 3px;
// $tipTimerBorder: solid 1px #555;
// $tipTimerColor: #666;
// $tipCloseColor: #777;
// $tipCloseSize: 20px;
// $tipCloseWeight: normal;
// $tipScreenFill: rgba(0,0,0,0.5);
Quote:
Did you ever post that article of closjure?
Yeah, a few pages back... Not Linking it Again.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 05:29 PM
Ok after some research etc. my question is basically (given that I only want a Linux and a Windows for now) should I
1) Install a desktop Linux (i.e. Xubuntu 12.04), enable KVM and turn it into the host OS and then add a Windows VM. Essentially I'll just use the host OS as my Linux
2) Install some no bells and whistles/lean Linux (using the entire disk) as my host and run a virtualized Linux desktop + virtualized Windows

Option 2 seems superior because tha way I can move my Linux VM, take snapshots and all that. Most tutorials I found seem to assume option 1 though.

My vision is basically some minimal Linux as the host that autoboots one or both guests and does nothing else. Would obviously be pretty neat if I could alt+tab between the VMs or have each use one monitor etc. pp
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 05:37 PM
Hey, clowntable, how did that Nand 2 Tetris go?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-31-2013 , 05:54 PM
Will be picked up again next week (well after the desktop reinstall whenever that is done) because my coursework and stuff has finished now. Had a couple of busy weeks with seminars and handling master applications and whatnot.

I've read the book untill the end of the hardware stuff and in theory could build alu+memory etc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2013 , 12:14 AM
clown,

how you configure your environment depends entirely on what you're trying to do with it. if you don't have something specific you're trying to do with a VM -- run some dumb app that only supports dump OS Foo without being forced to do everything in Foo, ring in an OS for malware research, build AMIs to push into EC2, etc. -- then you probably don't need to use one.

if you plan to use vagrant or similar (which i recommend unless you're trying to move into the systems/cloud engineering business), the benefits you'll get from using a standard configuration are sure to dominate whatever gains or nice feelings you'll get from using the vm solution you "want".
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2013 , 01:07 AM
So lately I've been kicking around the idea of starting a web site that provides free legal resources and information for tech companies.

My idea is to:

1. Aggregate legal resources that are relevant to running a tech/small business. There is no uniformity among the states or the federal government on how/where to retrieve and complete forms and applications. I'd like to abstract away, to the extent possible, the process of doing this.

2. Provide accurate legal information that's relevant to tech companies and small businesses. I'm picturing a library of clear, concise articles that cover topics like patent/copyright infringement, taxes, internal fraud, ACA employer mandate, etc.

I'd like it to have a lot of community involvement, particularly among those seeking help. I have some ideas for that.

While the idea of a Stackoverflow model is tempting, I just don't think it could work for legal information. There are just too many people who know for sure that undercover cops have to tell you they're the police if you ask, and they're sure because their cousin that's a parole officer told them about it.

Do you guys think this would actually be a valuable resource? Anything like it already exist? Suggestions or ideas?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2013 , 01:18 AM
I suppose I should mention that I have a law degree, and that I plan on thoroughly researching topics before posting. My goal is for the accuracy of the information to be on par with legal advice that one would expect to receive from a competent attorney on the same topic.

I'm going to make all supporting authority available for others to easily verify accuracy and to encourage others to help improve the articles. This will be heavily moderated -- I'll review all suggested improvements for accuracy prior to making public.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2013 , 01:32 AM
Quote:
Originally Posted by mindsplatter
Actually if anyone could make a recommend between bootstrap and that "other one" I'd be interested to hear opinions. (Paging DaveT!)
https://www.google.com/search?q=bootstrap+vs+foundation
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m