Open Side Menu Go to the Top

07-17-2014 , 07:59 PM
Quote:
Originally Posted by suzzer99
Just ignore.

Also wtf is angel list and white truffle?
Imagine linked in meets tinder except basically without recruiters. And instead of messaging you directly they click a button that says something like "interested" which triggers the site to send you an email with the company's profile. If you also click interested then the site triggers an intro email where you can communicate directly with the employer

Sent from my SAMSUNG-SGH-I747 using 2+2 Forums
** 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 **
07-17-2014 , 08:05 PM
https://github.com/ggp-org/ggp-base/...hineGamer.java

Is this standard looking java? With 15 lines of import statements at the top of each file?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-17-2014 , 08:54 PM
all my java projects have a billion imports. Half my key presses in eclipse are prolly hitting CTRL+SHIFT+O (auto import)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-17-2014 , 09:36 PM
Totally standard.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-17-2014 , 10:37 PM
Quote:
Originally Posted by skier_5
It doesn't make sense to inherit a Query from an OrderQuery. You're going to run into problems when you need to make another query type. It also violates the Liskov substitution principle and is just plain confusing for anyone reading the code. I would also keep all the OrderQuery related code in a single class (the methods and keys class variable) which inherits from a generic base class with all of the generic query related stuff (query variable and generic init method).
Thanks for keeping up with this. I started to rethink the problem a bit and thought of a few different approaches, and took a look at the Django source.

I have to create something that looks like this:

Code:
{'Item': {'ApplicationData': 'my sku',
          'AutoPay': True,
          'BestOfferDetails': {'BestOfferEnabled': False},
          'BuyerRequirementDetails': {'LinkedPayPalAccount': True,
                                      'MaximumBuyerPolicyViolations': {'Count': 3,
                                                                       'Period': 45},
                                      'MaximumItemRequirements': {'MaximumItemCount': 5},
                                      'MaximumUnpaidItemStrikesInfo': {'Count': 9,
                                                                       'Period': 'Days_40'},
                                      'MinimumFeedbackScore': -2,
                                      'ShipToRegistrationCountry': True,
                                      'VerifiedUserRequirements': {'MinimumFeedbackScore': 4,
                                                                   'VerifiedUser': True}},
          'CategoryBasedAttributesPrefill': True,
          'CategoryMappingAllowed': False,
          'ConditionDescription': 'new?',
          'ConditionID': 'USD',
          'Country': 'USA',
          'Description': 'words and words',
          'DisableBuyerRequirements': True,
          'DispatchTimeMax': 4,
          'GetItFast': False,
          'HitCounter': 'BasicStyle',
          'IncludeRecommendations': False,
          'InventoryTrackingMethod': 'ItemID',
          'ItemSpecifics': {'NameValueList': {'Name': 'more names',
                                              'Value': 'more values'}},
          'eBayNowEligible': False}}
And then I started to think about reducing the problem more to resolve the nesting issues. I began by removing the return self's and then removed the key lists:

Code:
class AddFixedPriceItem(Universal):

    ##Should be your listing_sku, not to be confused with the real product sku:
    def application_data(self, sku):
        if len(sku) <= 32:
            self.query['ApplicationData'] = sku

    def auto_pay(self, tf):
        if tf in [True, False]:
            self.query['AutoPay'] = tf

    def best_offer_enabled(self, tf):
        if tf in [True, False]:
            self.query['BestOfferDetails'].update({'BestOfferEnabled' : tf})

    def linked_paypal(self, tf):
        if tf in [True, False]:
            self.query['BuyerRequirementDetails'].update({'LinkedPayPalAccount' : tf})

    ## period is represented as Days_30, Days_180, etc
    def max_buyer_violations_count(self, cnt):
        self.mbpv['MaximumBuyerPolicyViolations'].update({'Count' : cnt})
        self.query['BuyerRequirementDetails'].update(self.mbpv)
        
    def max_buyer_violations_period(self, period):
        self.mbpv['MaximumBuyerPolicyViolations'].update({'Period' : period})
        self.query['BuyerRequirementDetails'].update(self.mbpv)
and then in the next class:

Code:
class Query(AddFixedPriceItem):
    def __init__(self, **kwargs):
        self.item = {}
        self.item['Item'] = {}

        self.query = {}
        self.query['BestOfferDetails'] = {}
        self.query['BuyerRequirementDetails'] = {}

        self.mbpv = {}
        self.mbpv['MaximumBuyerPolicyViolations'] = {}

        self.mir = {}
        self.mir['MaximumItemRequirements'] = {}

       ### etc......

        for k in kwargs:
            self.query = dict(zip(self.KEYS[k], value))
        self.item['Item'] = (self.query)
I was looking a bit at some other code on github (in particular, Django) and finding quite a few ideas. For one, I don't think I really need the above pattern, as I could probably initialize the dicts in the AddFixedPriceItem class itself and reduce the Query class to the loop. Haven't tried it yet.

I'll explore it further. I'm not very happy with the current pattern. There is a nagging feeling that my approach is wrong through and through, but this could be me kidding myself that a simple map shouldn't require much work.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 02:30 AM
So just an update for all you folks.

Finished Java last semester, got an easy A.

Currently taking an online pre-calc class for the summer. Pretty easy so far. Not sure if it's easy because it's online or because it's mostly review for me.

Anyways, I am planning to take calc 1 online along with C++ 1 and python programming. Three courses while working full time. Hopefully I can pull it off without dropping one of the classes!

I did a little of Udacity's python class 6 months ago so hopefully that would give me a little headstart. As for C++, I'm not sure if me working on ios programming (objective c) will help or not.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 04:55 AM
Quote:
Originally Posted by daveT
Thanks for keeping up with this. I started to rethink the problem a bit and thought of a few different approaches, and took a look at the Django source.

I have to create something that looks like this:

Code:
{'Item': {'ApplicationData': 'my sku',...
And then I started to think about reducing the problem more to resolve the nesting issues. I began by removing the return self's and then removed the key lists:

Code:
class AddFixedPriceItem(Universal):
...
and then in the next class:

Code:
class Query(AddFixedPriceItem):
...
I was looking a bit at some other code on github (in particular, Django) and finding quite a few ideas. For one, I don't think I really need the above pattern, as I could probably initialize the dicts in the AddFixedPriceItem class itself and reduce the Query class to the loop. Haven't tried it yet.

I'll explore it further. I'm not very happy with the current pattern. There is a nagging feeling that my approach is wrong through and through, but this could be me kidding myself that a simple map shouldn't require much work.
I agree it's pretty messy. I think what's throwing you off is your inheritance hierarchy, which I touched on in my previous post. You only want to inherit from classes which you can directly substitute for the parent class. So for example, if you have a query class and you have an API function PerformQuery(query), the idea is that the function doesn't care if you pass it an order query, or a customer query, or a product query. It uses the interface of the Query class only (on a side note, I have no idea if it's acceptable to skip the inheritance/query base class in python altogether and just expect the individual classes to contain the correct methods/variables). If you have 2 different queries with your design you cannot do this. Right now your Query is a AddFixedPriceItem which makes no sense. You want your AddFixedPriceItem to be a Query so you need to inverse the relationship. What's in the Universal class?

What you have up there should belong in a single class, with the exception of the kwargs loop if you choose to allow initialisation with your keys. Only code that would also apply to an ProductQuery, CustomerQuery, etc should go in the generic Query class.

Also, I don't think you need to have a separate dictionary for MaximumBuyerPolicyViolations, etc if you're going to put all of the logic into the AddFixedPriceItem class. Just update the correct sub dictionary directly.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 08:42 AM
Does anyone have much experience with node.js?

I am considering starting a project that involves an American football simulation. Basically, I pass it some factors such as a play and a lineup, and the game engine calculates the result and spits it back to the user.

I don't know if I should use node.js or if I should go with another language such as python/ruby. Everything I have read about node.js says not to block the event loop since its single threaded. This project would involve some calculations but nothing terribly intense.

The reason for wanting to use node.js is that I would like to just one language. If the project takes off, there would be multiple users logged in at the same time, each submitting plays. In that regard, the app would be more like a chat which node.js excels at (or at least, from what I have read.)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 08:57 AM
Node is fine but benchmarks show its not any better or faster than anything else really. Use it if you like it. I've never really understood the "one language" argument either unless you're doing a huge amount of regex validation or something.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 09:26 AM
Quote:
Originally Posted by Barrin6
So just an update for all you folks.

Finished Java last semester, got an easy A.

Currently taking an online pre-calc class for the summer. Pretty easy so far. Not sure if it's easy because it's online or because it's mostly review for me.

Anyways, I am planning to take calc 1 online along with C++ 1 and python programming. Three courses while working full time. Hopefully I can pull it off without dropping one of the classes!

I did a little of Udacity's python class 6 months ago so hopefully that would give me a little headstart. As for C++, I'm not sure if me working on ios programming (objective c) will help or not.
Haven't followed what you did but if you've finished Java I think you want to do some algorithms 101 next. Write some small Java project on the side and you're set for job interviews imo
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 02:22 PM
Quote:
Originally Posted by Scary_Tiger
Feel so bad at negotiating.

So my former manager (who left for another company a year ago) came calling last week wanting me to apply for an opening under his new boss. I put it in through their job site this morning and went for a run at lunch. As I got home I received a call from an unknown number and ended up doing a 30 minute interview with their IT HR guy. Anyone beg off and reschedule? Didn't feel very prepared and definitely didn't handle talk around compensation as well as I would like.
Part two. So I've now done five interviews with the company including having to fill out two Taleo-ish applications. The second one "required" salary history which I wrote in "Private". Got a call from their IT HR guy today where he wants to know my current salary so he can negotiate "on my behalf" with the hiring manager. I don't really understand what that even means, but I declined to provide it.

If it matters, the IT HR guy has evidently been the only one to provide negative feedback to the hiring manager. (Heard this from my former manager.) The hiring manager and three technical people I interviewed with evidently had good things to say.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 02:40 PM
Quote:
Originally Posted by Tim Brice
Does anyone have much experience with node.js?

I am considering starting a project that involves an American football simulation. Basically, I pass it some factors such as a play and a lineup, and the game engine calculates the result and spits it back to the user.

I don't know if I should use node.js or if I should go with another language such as python/ruby. Everything I have read about node.js says not to block the event loop since its single threaded. This project would involve some calculations but nothing terribly intense.

The reason for wanting to use node.js is that I would like to just one language. If the project takes off, there would be multiple users logged in at the same time, each submitting plays. In that regard, the app would be more like a chat which node.js excels at (or at least, from what I have read.)
Yeah node is fine for this. Or php or ruby if it's as simple as it sounds.

If you already have front-end devs comfortable with JS that will help some in learning node. But there's also a lot of node-specific stuff that your average front end JS dev might not be familiar with like closures, promises and middleware. Also they should be familiar with basic webserver concepts like request/response and request/session/application scope.

Node/express still has some major gotchas in that it's really easy to put something in application scope when you mean it to be in request scope. Which is particularly insidious because the bug will only show up when you are running a bunch of users simultaneously. IE - production. And the bug will be very weird and intermittent. Pretty much a nightmare scenario.

PHP and ruby on rails have a lot more guardrails to prevent this kind of thing. And actually my soon-to-be-released open-source node framework will hopefully make it easier for people like you who just want to get some pages up and running without necessarily having to understand all the vagaries of node plumbing.

Check out locomotive.js as well for some guardrails. From what I've read, locomotive is great if you need a full-blown MVC framework. My framework is component-based and assumes your back end API or DB handles stuff like caching and you don't need complex data models in node.

Last edited by suzzer99; 07-18-2014 at 02:47 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 04:42 PM
Quote:
Originally Posted by clowntable
Haven't followed what you did but if you've finished Java I think you want to do some algorithms 101 next. Write some small Java project on the side and you're set for job interviews imo
is that really all you need to land a job?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 05:00 PM
Do average front end developers really not know about request / response and javascript closures and promises?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 05:06 PM
Yes, they often do not. If you don't have to work with it you don't learn it. Someone might have explained closures or promises to you once, but unless you're actually using it you won't know when, why or how to apply it. I didn't until I started programming node.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 09:42 PM
Quote:
Originally Posted by Alobar
is that really all you need to land a job?
well, sure, but probably not someplace good.

but there's a whole confidence game aspect to the programmer market which can get unqualified people far.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 09:47 PM
Quote:
Originally Posted by Scary_Tiger
Part two. So I've now done five interviews with the company including having to fill out two Taleo-ish applications. The second one "required" salary history which I wrote in "Private". Got a call from their IT HR guy today where he wants to know my current salary so he can negotiate "on my behalf" with the hiring manager. I don't really understand what that even means, but I declined to provide it.

If it matters, the IT HR guy has evidently been the only one to provide negative feedback to the hiring manager. (Heard this from my former manager.) The hiring manager and three technical people I interviewed with evidently had good things to say.
i mean this respectfully, but for a smart guy this comes off naive. the number they're asking for is just code for what you want to paid.

not sure if someone linked to this yet, but it seems obligatory here: http://www.kalzumeus.com/2012/01/23/salary-negotiation/
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 09:57 PM
Quote:
Originally Posted by skier_5
I agree it's pretty messy. I think what's throwing you off is your inheritance hierarchy, which I touched on in my previous post. You only want to inherit from classes which you can directly substitute for the parent class. So for example, if you have a query class and you have an API function PerformQuery(query), the idea is that the function doesn't care if you pass it an order query, or a customer query, or a product query. It uses the interface of the Query class only (on a side note, I have no idea if it's acceptable to skip the inheritance/query base class in python altogether and just expect the individual classes to contain the correct methods/variables). If you have 2 different queries with your design you cannot do this. Right now your Query is a AddFixedPriceItem which makes no sense. You want your AddFixedPriceItem to be a Query so you need to inverse the relationship. What's in the Universal class?

What you have up there should belong in a single class, with the exception of the kwargs loop if you choose to allow initialisation with your keys. Only code that would also apply to an ProductQuery, CustomerQuery, etc should go in the generic Query class.

Also, I don't think you need to have a separate dictionary for MaximumBuyerPolicyViolations, etc if you're going to put all of the logic into the AddFixedPriceItem class. Just update the correct sub dictionary directly.
The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said "Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, "Foolish pupil - objects are merely a poor man's closures."

Chastised, Anton took his leave from his master and returned to his cell, intent on studying closures. He carefully read the entire "Lambda: The Ultimate..." series of papers and its cousins, and implemented a small Scheme interpreter with a closure-based object system. He learned much, and looked forward to informing his master of his progress.

On his next walk with Qc Na, Anton attempted to impress his master by saying "Master, I have diligently studied the matter, and now understand that objects are truly a poor man's closures." Qc Na responded by hitting Anton with his stick, saying "When will you learn? Closures are a poor man's object." At that moment, Anton became enlightened.


****

I've read it a million times, from the Yegge rant to many books and blog posts about Nouns and Verbs. I was deeply confused for a few days, then it hit me that I'm thinking in Verbs whilst you are writing about Nouns. You are saying "this is a dictionary," and I'm saying "I am trying to build a dictionary."

After looking at the Django and other sources, I wondered why they didn't have classes, and then it hit me. I am attempting to build dictionaries while using something that represents what is a dictionary.

I am Doing it Wrong (TM).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 10:45 PM
Go figure, the day before Amazon introduces Kindle Unlimited, I bought this book:



Yeah, I'm that bothered about not doing the world's best job.

Still on the first few chapters, which is about planning. Now that I've read the more professional / enterprise version of Planning, I can see how someone from the Oracle World would think I'm a drooling idiot.

Had an interesting conversation today about some lol-code I created. I showed her what I completed and asked her if there was any way to improve it. She looked at me and said: "Well, yeah, it could be better, but knowing you spend so much effort and time on it, I don't want to say anything."

During my C# "job," the guy had zero problems changing spec, which caused me to delete hundreds of LOC and start over from scratch. If I didn't learn anything else from the guy, I definitely learned that code is not sacred, and deleting trash feels good once you learn to disconnect from the ideas and time investment. There is true magic in C-x h [backspace] (CTR-A [backspace]).

I told her my general philosophy on not caring one iota, and she said that I should be using temporary tables and left me hang on that one for a while, and this mystified me pretty good since my function used a bunch of temp tables. After a few hours of digging, I showed another function and she said it was much better. Didn't say it looked professional or anything, but hey, gotta take what you can get.

Now to go delete some Python code!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 10:51 PM
You might want to get this too.

** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 10:59 PM
Question for you guys, mainly recruiters but also any programmers:

How would you feel about employing someone with an IT degree (for programming)? Would you consider them for an interview if they took hard subjects? I have to make a choice whether to go for a fairly hardcore computer science route or economics/IT. If I tried the science route I'd start with the lone IT degree (while taking advanced classes) and try to get the grades to transition. Economics is appealing to me but I don't want to shut myself out of good computer jobs should I decide to go the tech route after graduation. I don't think it's possible to transfer to Advanced Computing (the more hardcore degree) if I'm doing Econ/IT, and I wanna graduate as efficiently/quickly as possible since I'm applying as a mature age student, so I kinda need/want to make a decision before starting.

FWIW the IT degree offers the option to be fairly rigorous (syllabus links included below) I'm just mainly worried about employers filtering me out because my degree says Information Technology

Bachelor of IT: http://programsandcourses.anu.edu.au/program/BIT
Bachelor of Advanced Computing: http://programsandcourses.anu.edu.au/program/AACOM
Economics/IT: http://programsandcourses.anu.edu.au/program/BECON/BIT

There's also a Software Engineering degree but I'd have to do the same IT > good grades and it seems to me Advanced Comp is a better degree to have. Link anyway: http://programsandcourses.anu.edu.au/program/ASENG
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 11:00 PM
Quote:
Originally Posted by suzzer99
You might want to get this too.

Historically, all software projects have involved a certain degree of risk and pressure -- but many of the projects in today's chaotic business environment involve such intense pressure that they are referred to colloquially as "death-march" projects -- i.e., projects whose schedules are so compressed, and/or whose budgets, or resource (people) assignments are so constrained, that the only "obvious" way to succeed is for the entire team to work 16 hours a day, 7 days a week, with no vacations until the project is finished. While the corporate goal of such projects is to overcome impossible odds and achieve miracles, the personal goal of the project manager and team members often shrinks down to mere survival: keeping one's job, maintaining some semblance of a relationship with one's spouse and children, and avoiding a heart attack or ulcer. This new and thoroughly-updated edition of Ed Yourdon's book takes into account many of the changes that have taken place in the more than six years since the publication of the first edition.

At least I'm not at 16 hour days, though I am underpaid and could use a vacation.

I love the blunt title and yeah, we are achieving miracles. The oft-used quote is "searching for flying pigs."
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-18-2014 , 11:02 PM
^^the required classes are near the bottom of the page, and the 3000/4000 level courses at the end of IT are the same as in the advanced degrees. There's not as much math but again you can choose those if you wish. So it seems to me it's mainly a name thing
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-19-2014 , 03:04 AM
After a month or so of going through tutorials i have found that i really enjoy programming.

Should i install linux (or something else?) on a virtual machine or is that overkill at this stage? Will i be just as well going with windows 7 for the foreseeable future? (i'm learning python fwiw)

Thanks!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-19-2014 , 03:58 PM
why is it that Java is such a popular language with a huge community and yet i see more disdain shown for it by programmers than any other language?
** 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