Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Fiend posted:

Talk to other people in your business group and industry. Remember that it is illegal for an employer to ban discussions of compensation, so keep in mind when bringing it up at the water cooler when someone argues they signed a contract that forbids this type of discussion. It would cost a company less to compensate everyone fairly than it is to put the hammer down, run afoul of US labor law, and scare away great employees.

I don't think Vancouver is bound by US labor law. Not saying Canada doesn't have similar labor laws there...

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

how!! posted:

Why do you want me to rewrite strlen, sort, or strcat?

To ensure you know what they do. strlen and strcat are both two lines of code max.

Yes, they'd be slower, but that's not the point. You have to know how they're implemented in C, otherwise you don't know C.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Optimus Prime Ribs posted:

How would you make that only two lines? Move the if statement into the for's condition or something?

I was looking for something along the lines of:

C++ code:
int strlen(char *src) {
   char *orig = src;
   while (*src++) ;
   return src - orig;
}

void strcat(char *dst, char *src) {
   while (*dst++) ;
   while ((*dst++ = *src++)) ;
}

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

"Uh, sir, we do iPhone development"

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Yes. That should not happen on any platform glibc supports.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
The only reason they're doing that is because there was some guy straight outta college who looked it over and thought, "yeah, maybe that's what I deserve in compensation", and they're trying to pull another fast one.

Don't let them pull that fast one, neither on you nor any future sucker. Counter-offer.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

quote:

labor markets

What employers want is the ability to fire anybody at any time for any reason.

What employees want is exactly the opposite.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

how!! posted:

It is much easier to get a job in NYC if you live in NYC (replace NYC with any city and it still holds true)

Your interview stories tell it differently.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

how!! posted:

It depends on the project. If your codebase is a 2 million line disasterpiece, then yes, expect any employees (even the superstars) 6 months before they can contribute anything useful.

OK you're trying too hard how!! now get out you're boring us.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Can I ask what dependency injection is? And Inversion of Control? I've looked around for it, and usually I start seeing junk about XML configuration, and I click the little "X" button on my browser tab, because I have better things to do.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
OK, so dependency injection is basically "implementing interfaces".

Why did we need a new term for that?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Null Pointer posted:

Dependency injection basically means not using "new" in your constructors.

I thought that was a factory?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Sure, but instead of adding an XML layer of configuration or whatever that describes some worthless code garbage, I create some code that creates all the objects and passes them around. I call it the "Driver".

And I would never call this "dependency injection". I don't even know how interfaces were intended to be used other than having multiple swappable things that are independent, and I don't know how you'd use the swappable things if you never passed them around anywhere.

And I don't see how the XML registry will help anybody, given that it's global. The big advantage of doing this is that you can use different fetchers at runtime.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I guess I feel it's strange that what I thought was a natural and common pattern of passing objects to other objects has such an obtuse name.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

how!! posted:

What makes a great boss, is almost completely the opposite of what makes a great developer. For instance, charisma, negotiation skills, friendly disposition, etc, all are great traits for a boss. Those skills will get you nowhere as a engineer. You can't sweet talk a computer. The act of programming a computer is pretty much the exact opposite thing as negotiation. Basically bosses exist to pick up the slack that engineers leave. Engineers pick up the slack that bosses leave.

As a non-engineer, it will be very difficult for you to determine who will be a good engineer and who will be a bad engineer. Its like if you put me in charge of hiring a great chef. I don't know poo poo about food. I can't tell the difference between world-class soup and something heated up in the microwave that came out of a can.

That said, good engineers make things. Ask the candidate to speak about the things they've built. Focus on hobby projects over stuff they worked on for a job. If they have nothing they've built that wasn't assigned in class or assigned for work, be weary.

Also, dig deep into one thing, rather than broad. A gerat engineer is someone who can teach. Have him explain something to you that you don't understand. Ask lots of questions. Really try to have the candidate teach you about something, and really be honest when you don't understand what he/she is saying. The best interviews are the ones that are genuine. The worst interviews are when the candidate asks fake questions like FizzBuzz and other retarded puzzle questions.

♪♫ One down, one to go. Another thread, and one more show!! ♪♫

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
By "C" player, he means "Kanye" player. Read his groundbreaking thesis on human archetypes:

http://www.slideshare.net/priestc/the-kanye-quotient

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Good Will Hrunting posted:

E: Why would you ask someone to code a primality test? It's all memorization and (in my opinion) not a great test of whether someone can code or not.

You should be able to reason out a simple prime test. Even if it's not a fancy schmancy algorithm like a Sieve, it's a simple for loop.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
It's more effective than you think, or you probably want to know.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Sounds like a "hot resume tip" a career counselor would give you.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
One of the best programmers I've ever worked with started programming by taking a 101 course in college, so it's not "the best programmers are always dropouts". I never went to college, but I sort of regret it, I feel like I'm less well-rounded and less-disciplined of a person in response. I don't feel like I'd learn anything related to programming in college, it's just all those other things...

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Zhentar posted:

I really, really, really hate performing code reviews. Nonetheless, I absolutely would not want to work somewhere that releases code to customers without performing them.

It's sort of annoying occasionally, but as long as there's a good workflow, I find it really useful. If he's inexperienced about this area of the code, you can teach him, and if you're inexperienced, you can learn pretty quickly. It's not just about "good code" in the end, and finding petty formatting poo poo, but I think that over time it increases the bus number a lot.

It's also a fun way to vent if somebody pisses you off, you can always find petty stuff to keep them and their code in limbo forever.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

return0 posted:

I'm sorry but this is bullshit. Colleges are not for this type of applied vocational learning, it is an absolute waste of resources; employers should provide training on their selected SCM tool, and shouldn't let junior or new employees who are incompetent with their process commit unsupervised until they have reached a minimum level of competence. Your attitude excuses lazy, cheap employers from accepting their responsibility to provide vocational training and pushes it onto educational establishments which are not setup to bear that cost.

Or, in your opinion, which version control should system should people be taught at uni? Git? Mercurial? svn? All of them? Why?

I'm sorry but this is bullshit. Colleges are not for this type of applied vocational learning, it is an absolute waste of resources; employers should provide training on their selected program language, and shouldn't let junior or new employees who are incompetent with their language code unsupervised until they have reached a minimum level of competence. Your attitude excuses lazy, cheap employers from accepting their responsibility to provide vocational training and pushes it onto educational establishments which are not setup to bear that cost.

Or, in your opinion, which programming language should be taught at uni? Java? Python? C? MIPS assembly? All of them? Why?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

return0 posted:

Well, I don't know what your point is but I do not believe that a CS degree should merely teach programming languages.

Neither do I.

return0 posted:

To answer your question, I think that students should learn whatever languages the syllabus uses to convey/apply the actual concepts taught.

To answer your question, I think that students should learn whatever source control management tool the syllabus uses to convey/apply the actual concepts taught.

return0 posted:

What the gently caress do you guys think a CS degree is?

A degree that certifies that you are allowed to work at a place writing software. May include learning "the way of the computer", understanding logic, building several pieces of real-world software, and generally applies the latest best engineering practices.

Other engineering degrees include lots of "vocational" teaching. If you become an electrical engineer, for example, it will not only teach you "the way of the electron" but also requires that you build real-world circuits and engineer various real-world projects and use current engineering practices to manage and build the project.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Because as Ithaqua shows, it's possible these skills won't be learned in the workplace. Teaching them to university students helps ensure these best practices are more widespread than they currently are.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Everything is more expensive over there, too. A Starbucks coffee cost me two bucks more than it does over here in New England.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Hard NOP Life posted:

In java you get 20

How is this not a Shaggar post?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Work can be hard to find in this economy.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

rotor posted:

actually its dead simple easy to find right now but you have to (now bear with me here) you have to go to where the jobs are.

your profile says you're in boston. there should be plenty of jobs available. if this is not the case, consider moving to the bay area, where all the technology is. the market for programmers - even ones fresh out of school, assuming they're not brain dead - is super hot. If you have a CS degree and you're making pizzas, then something has gone seriously loving wrong vis a vis your career plans.

Yes, I'm lucky to live in such a thriving city, and have such an amazing job. Others are less fortunate.

But yeah, if you apply to pretty much any tech company, they'll fly you out, and if you're finding trouble getting lodging, they'll put you up in a hotel for a few months while you hunt, or with a lot of SF startups, they'll let you stay at the owner's house for a bit.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Pilsner posted:

I was about to say.... SO must be sparsely used - 406 jobs in all of California, home of the tech boom??

I suppose it's because the community of active people there are most likely the people that already have jobs. Both it and the GitHub Jobs websites are barren wastelands for how high profile the websites actually are.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Jsor posted:

But you guys are right, I'm really too much of a blithering idiot for CS. A friend of a friend who works there apparently said the interviewer did recommend me for another interview (my friend wanted them to ask for me for some reason), but I haven't heard for weeks. Still I just sent a followup email saying that I'm too stupid to work there.

Let me tell you something: 90% of the other applicants that applied wouldn't be able to answer that question.

In no way are they laughing at you and thinking you're stupid. They're already too busy laughing at the people who answer the question with "what's a 'stream of numbers'".

Jsor, you aren't dumb, and please stop beating up on yourself. It's not a nice thing to do and it makes me worried.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Did DeadCthulu even mention that the people he wanted to explain it to people outright rejected it or felt that it was a waste of time? From what I saw, he needed some way to explain it to new learners.

Put down your copies of the DSM-V, everybody.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
But note that writing "Cheetos" on your resume is also an instant red flag. It's a catch 22.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Ithaqua posted:

Do your developers write unit tests? If yes, how do they achieve inversion of control? What mocking frameworks do they use? How frequently are the tests run?

If they can't talk about IOC and dependency injection, 90% chance they're not unit testing, or not doing it properly. Same goes for mocking.

I've never heard a good explanation for what Inversion of Control is. As far as I understand it, it's basically a fancy name for "passing something as an argument to something else". Unless I'm confusing it with Dependency Injection.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
This is really a pet peeve of mine, so I'm sorry for bringing it up in the thread, but I absolutely hate when people say "frobinate the bars" and expect this abstract example to apply to my codebase. So I'm going to use a specific example, stripped from an actual app I'm buidling: on mobile phones or desktop machines, there's a new concept called a "notification", where my app can send out a subject and a body and maybe some action.

Some example APIs: HTML5 Android Apple Windows 8

So, let's say I'm writing an email client and want to show a notification when an email comes in. With the exception of HTML5, which shows a notification as soon as the constructor completes (a bit unorthodox, maybe I'll send a mailing list post about it), it seems that what I do is I construct a Notification, and then somehow pass it to a singleton manager object for display.

I build a simple wrapper API for this:

Python code:
class Notification(object):
    def __init__(self, title, body, icon):
        self.title = title
        self.body = body
        self.icon = icon

class NotificationManager(object):
    def notify(self, notification):
        pass

class Windows8NotificationManager(object):
    def notify(self, notification):
        native_notif = ToastNotification("... imagine a string of XML here ...")
        createToastNotifier().show(native_notf)

class AppleNotificationManager(object):
    def notify(self, notification):
        native_notif = NSUserNotification(notification.title, notification.body)
        NSUserNotificationCenter.defaultNotificationCenter.scheduleNotification(native_notif)

class AndroidNotificationManager(object):
    def notify(self, notification):
        builder = Notification.Builder()
        builder.setContentTitle(notification.title)
        builder.setContentText(notification.body)
        builder.setSmallIcon(notification.icon)
        native_notif = builder.build()

        getSystemService(Context.NOTIFICATION_SERVICE).notify(1, native_notif)
(not actually Python, but hopefully it gets the point across)

So, I have a data object (my Notification), which sends a notification to a singleton manager. Would it be worth it to pass the manager in, so I can mock that out? If so, do you guys know of any mock libraries for system integration stuff like this so I don't have to build my own?

Does Android/Apple/Windows 8 have any testing support built in so I can launch with a dummy notifications service and guarantee that everything showed up OK?

Should I simply build a high-level dummy like a DummyNotificationManager, and simply drive a fake email all the way through, and ensure getting the right notifications at the right time? That's not a unit test, though? That's an integration test?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

No Safe Word posted:

Yes

And for those who need context as to the terribleness we're talking about, feel free to read his post history in this thread for which he got banned and comedy rap sheet showing the progression of it all.

That doesn't include the thread he made where he was mad that whenever he got to a new company, he was fired for suggesting it would be more fun to rewrite the entire codebase because he couldn't understand it.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
This one.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

shrughes posted:

I don't even know what Model-View-ViewModel is. It would take like 1 minute to explain it to somebody.

So, you don't know what it is, but you're sure it would take a minute to learn? Please spare a minute and tell me what it is, then, since I've been trying to figure it out for two years now.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Malcolm XML posted:

In mvvm you don't bind the view to the model, but to a projection of the model into something more useful called the viewmodel. You still have controllers floating around doing logic but the views are coded against the ViewModel rather than the model. It's a subtle distinction but still useful.

Can you give a quick example?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Ithaqua posted:

Does that make more sense?

Yep. And I had a suspicion it would be something like this. I don't normally write MVC-separated code, although I clearly should get better. I've seen a lot of bugs in code like this:

JavaScript code:
var userList = loadFromServer();
var button = new Button();

function addUser(user) {
    userList.push(user);
    button.sensitive = true;
}

function removeUser(user) {
    userList.remove(user);
    if (userList.length == 0)
        button.sensitive = false;
}
The bug here is that it's not initialized properly if the server returns an empty user list initially. (I just fixed one like this two days ago, too)

I've started a new pattern in all code I write, which I name "the sync pattern", that looks like this:

JavaScript code:
var userList = loadFromServer();
var button = new Button();

function syncButton() {
    button.sensitive = (userList.length > 0);
}

function addUser(user) {
    userList.push(user);
    syncButton();
}

function removeUser(user) {
    userList.remove(user);
    syncButton();
}

syncButton();
Now, the condition for when the button should be sensitive is clearly visible in the code, not the artefacts how to change it. Obviously, there's still a bit of cruft here in that I have to manually call syncButton when userList changes. I believe one of the front-end JS frameworks (Angular, Backbone, Knockout, Ember, whatever) can do the tracking of the array manually and apply the postcondition automatically when it detects the length changed, but all the JavaScript code I write is desktop JavaScript, I can't use those.

Would this style be ViewModel-ish? Or not?

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

shrughes posted:

Imagine being a liberal white person with ingrained racial prejudices. Seeing a Microsoft Word resume is kind of like meeting a black person, you have to smother your initial preconceptions and think "Oh, I'm not going to assume this person's of below average intelligence.")

You are the problem.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply