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
Doctor w-rw-rw-
Jun 24, 2008
Yes, hardware mocking is definitely as easy as downloading a framework and plugging it in /s

I wouldn't count on an embedded system to necessarily have a lot of extra hooks or extra memory to make it as easy as you say.

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...

Doctor w-rw-rw- posted:

Yes, hardware mocking is definitely as easy as downloading a framework and plugging it in /s
There are frameworks for hardware/embedded mocking: https://github.com/ThrowTheSwitch/Unity/

Doctor w-rw-rw- posted:

I wouldn't count on an embedded system to necessarily have a lot of extra hooks or extra memory to make it as easy as you say.
C is C. It runs on desktops now. There's a tiny shim layer for things like integer width, but there should be a HAL somewhere that makes the application code fairly agnostic to the platform.

There's no excuse, especially if you're doing less than half of 35 hours a week, for pretending like this is impossible.

b0lt
Apr 29, 2005

Doctor w-rw-rw- posted:

Yes, hardware mocking is definitely as easy as downloading a framework and plugging it in /s

I wouldn't count on an embedded system to necessarily have a lot of extra hooks or extra memory to make it as easy as you say.

Presumably, he isn't sshing into an embedded system and running git pull and restarting uwsgi.

Doctor w-rw-rw-
Jun 24, 2008
You linked to a testing framework, not a mocking framework. I'm saying that hardware with a bunch of debug hooks and sensitive timing won't always respond well to splicing test hardware in. FPGAs have that option if they've got space, but still have to be re-laid-out. ASICs don't, unless you built and fabricated in the electronics to do so. So for embedded systems, the difficulty of "just build something that acts exactly like the real module only it feeds fake data" can range from "exceptionally easy" to "virtually intractable" depending on how deeply you need to insert that fake data.

No, embedded C and desktop C aren't necessarily the same. Memory management, interrupts, and error handling aren't necessarily the same.

You might have those for a particular device, but for an embedded system, without prior knowledge of the particular processor, you can't rely on it being true.

EDIT: I misunderstood the context and thought that he was ssh'ing into a server rather than the device, and was talking about testing the device.

sarehu
Apr 20, 2007

(call/cc call/cc)
For GPS tracking it's totally tracktable.

baquerd
Jul 2, 2007

by FactsAreUseless

Doctor w-rw-rw- posted:

EDIT: I misunderstood the context and thought that he was ssh'ing into a server rather than the device, and was talking about testing the device.

He said "We are building a device that uses GPS to track your location, sort of like how Uber works." so who knows what that actually means. In my dealings with GPS signals (CAN bus, Android), it's just effective a source of lat/lon coordinates that super easy to mock out, I'm not talking directly to the hardware.

JawnV6
Jul 4, 2004

So hot ...

Doctor w-rw-rw- posted:

You linked to a testing framework, not a mocking framework. I'm saying that hardware with a bunch of debug hooks and sensitive timing won't always respond well to splicing test hardware in. FPGAs have that option if they've got space, but still have to be re-laid-out. ASICs don't, unless you built and fabricated in the electronics to do so. So for embedded systems, the difficulty of "just build something that acts exactly like the real module only it feeds fake data" can range from "exceptionally easy" to "virtually intractable" depending on how deeply you need to insert that fake data.
Gosh, thought you’ve give me the slightest benefit of the doubt and recognize I was linking to the framework you were missing, not just the mocking structure. Here’s the mock framework that plays nice with that framework: https://github.com/ThrowTheSwitch/CMock

I’ve mocked multiple hardware modules with this in a professional context and caught bugs on a beefy host. And I don’t see you addressing jack poo poo about how a HAL should protect your app code from being dependent on all those gritty details, just vacuous clucking about how hard it might be in theory.

Doctor w-rw-rw- posted:

No, embedded C and desktop C aren't necessarily the same. Memory management, interrupts, and error handling aren't necessarily the same.
Wow! Really? Hm, I wonder if this embedded framework you didn’t give two shits about in your rush to get off a sick burn does most of this: https://github.com/ThrowTheSwitch/Unity Integer width causes a lot more headaches than memory management in my experience anyway.

Doctor w-rw-rw-
Jun 24, 2008
Yeah, you're right. I was irritated from something completely unrelated and was being a smartass. Sorry for that.

fritz
Jul 26, 2003

genki posted:

There are many areas of Twitter in the technical back end that could and probably do involve graph problems and pathfinding.

At one point twitter employed the guy who wrote graphchi (https://github.com/GraphChi/graphchi-cpp) and any company that's in anything like a social network business is gonna be doing a ton of graph analytics.

fritz
Jul 26, 2003

sarehu posted:

Also if you want real-world data, you can record it and play it back in the tests.

One of the things I've been pushing for at currentjob is to get our db of real-world data fleshed out so that we can run it thru our tests, and I think we're just about to the point where we'll be able to get jenkins to run our tests on real data. (I've also been pushing for us to hire somebody to manage all this infrastructure, but: w/ever)

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

JawnV6 posted:

Gosh, thought you’ve give me the slightest benefit of the doubt and recognize I was linking to the framework you were missing, not just the mocking structure. Here’s the mock framework that plays nice with that framework: https://github.com/ThrowTheSwitch/CMock

That looks like it's not horrible and mocking might be helpful with the given situation where you're talking to a GPS transceiver (though I suspect not too helpful) but most of the bugs I run into are timing issues, driving peripherals or external chips wrong (or peripherals or external chips not wanting to be driven even when I do it right :argh:), poking the wrong address, communication over a bus having some issue, discrepancies between the schematic or layout and the intended design, etc. And while it's great to catch as many bugs as you can with unit testing and other varieties of automated testing, this (relatively barebones? unless I'm missing something) test & mock framework doesn't look like it does enough to make that a ton easier than writing tests without a harness usually is. For example, the last chunk of substantial library-ish code that I wrote which I wound up testing on a desktop for speed & memory reasons (it was basically a sprintf implementation, so I had 4.something billion test cases) wouldn't have been a lot easier to test with this than with the ghetto harness thingy I wound up writing to run the tests and dump the report in a spreadsheet.

Something that would be really useful to me would be a mocking framework that allowed me to mock a pulse X ms wide on pin Y with chatter typical of a microswitch or membrane keypad, or the ability to mock commo over SPI with packet contents following a template I provide and drop bits with probability P and stuff like that. But you'd probably need a real simulation environment to do that.

Aside: Atmel fed me and my coworkers lunch the other day as they gave a pitch on the upcoming generation of SAMLxx Cortex M0+ chips and their IDE has a built-in power profiler that will give you a dataviz of power from Vdd and AVdd over time and automagically line it up with your call stack. That seemed really slick and super useful.

Blotto Skorzany fucked around with this message at 02:11 on Sep 19, 2015

fritz
Jul 26, 2003

Blotto Skorzany posted:

wouldn't have been a lot easier to test with this than with the ghetto harness thingy I wound up writing to run the tests and dump the report in a spreadsheet.

Gtest is c++, but if you can get it linking to your c code it works just fine for testing that as well.

Pollyanna
Mar 5, 2005

Milk's on them.


fritz posted:

At one point twitter employed the guy who wrote graphchi (https://github.com/GraphChi/graphchi-cpp) and any company that's in anything like a social network business is gonna be doing a ton of graph analytics.

One of the things I've been pushing for at currentjob is to get our db of real-world data fleshed out so that we can run it thru our tests, and I think we're just about to the point where we'll be able to get jenkins to run our tests on real data. (I've also been pushing for us to hire somebody to manage all this infrastructure, but: w/ever)

You know what, I think I need to actually learn more about this. It's clear that I don't quite have the background for working with big data. Where do you suggest I start learning? What do I need to know about? What resources are good?

Doctor w-rw-rw-
Jun 24, 2008

Pollyanna posted:

You know what, I think I need to actually learn more about this. It's clear that I don't quite have the background for working with big data. Where do you suggest I start learning? What do I need to know about? What resources are good?
Algorithms by Vazirani, U. and Papadimitriou, C. and Dasgupta, S.
Amazon: http://www.amazon.com/Algorithms-Sanjoy-Dasgupta/dp/0073523402
Vazirani's got the PDFs numbered by chapter on his site: https://www.cs.berkeley.edu/~vazirani/algorithms/chap0.pdf
Full version found via google: http://beust.com/algorithms.pdf

EDIT: If you meant something different than asking for a text going over algorithms, then that's my mistake.

Doctor w-rw-rw- fucked around with this message at 09:07 on Sep 19, 2015

kitten smoothie
Dec 29, 2001

Doctor w-rw-rw- posted:

Algorithms by Vazirani, U. and Papadimitriou, C. and Dasgupta, S.
Amazon: http://www.amazon.com/Algorithms-Sanjoy-Dasgupta/dp/0073523402

I'm looking for a decent text to refresh my nitty gritty from undergrad. Is there a particular advantage of this book over CLRS, since I still have a copy of that from the 90s?

Pollyanna
Mar 5, 2005

Milk's on them.


Doctor w-rw-rw- posted:

Algorithms by Vazirani, U. and Papadimitriou, C. and Dasgupta, S.
Amazon: http://www.amazon.com/Algorithms-Sanjoy-Dasgupta/dp/0073523402
Vazirani's got the PDFs numbered by chapter on his site: https://www.cs.berkeley.edu/~vazirani/algorithms/chap0.pdf
Full version found via google: http://beust.com/algorithms.pdf

EDIT: If you meant something different than asking for a text going over algorithms, then that's my mistake.

That is actually more or less what I was asking for :shobon: But also a kind of tip on where to look for learning how to work with graphs and make algorithms from them, and how big data uses them, and what big data is concerned with anyway.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

kitten smoothie posted:

I'm looking for a decent text to refresh my nitty gritty from undergrad. Is there a particular advantage of this book over CLRS, since I still have a copy of that from the 90s?

DPV is a very different text from CLRS - much more of an introduction and less of a reference. It also covers fewer topics and is waaaaaaay shorter.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Graph algorithms are used in social network analysis, which is the sort of thing that Facebook/Twitter/Google/etc. care about. There are books on that topic, but I don't know the literature well enough to recommend any.

There are other big data companies who don't really do that kind of thing, but they might ask you some basic algorithms questions as part of the interview process. Not everyone who's thought about the interview process thinks highly of that practice, but most people don't think that much about it, so it's standard.

fritz
Jul 26, 2003

Pollyanna posted:

That is actually more or less what I was asking for :shobon: But also a kind of tip on where to look for learning how to work with graphs and make algorithms from them, and how big data uses them, and what big data is concerned with anyway.

Coursera had a vide on social network analysis a couple years ago, and the talks are online at github: https://github.com/ladamalina/coursera-sna

Also there's an "algorithms 2" coming up https://www.coursera.org/course/algs4partII that has a lot of graph stuff.

Where 'big data' comes into this is when you have millions (billions) of nodes and ten or more times that number of edges, and you have to fit all those things into memory / on disk and do things to it quickly.

sink
Sep 10, 2005

gerby gerb gerb in my mouf

pr0zac posted:

Yes.

Also learn Go instead.

Please don't. Go is about as awful as nodejs. I hope it goes away as soon as possible.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

sink posted:

Please don't. Go is about as awful as nodejs. I hope it goes away as soon as possible.
I really hope Rust takes off soon because it has basically everything that makes Go good but also isn't awful in every other way

sink
Sep 10, 2005

gerby gerb gerb in my mouf
Totally. Rust is what Go should have been. It's doing fairly well considering how it doesn't have the backing of an enormous conglomerate. At least it has captured the imaginations of PL nerds.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Bruegels Fuckbooks posted:

Promotions typically aren't salary increases anymore, just more work and a potentially better job later. You should ask for a salary increase, but typically, the payoff comes when you switch jobs.

I did inquire about this with my manager. Apparently how this place works is: promotions all come in September at once. Reviews and salary recalculations due to promotions all come in March at once. :fuckoff:

Doctor w-rw-rw-
Jun 24, 2008

sink posted:

Totally. Rust is what Go should have been. It's doing fairly well considering how it doesn't have the backing of an enormous conglomerate. At least it has captured the imaginations of PL nerds.

I dunno, Java is the easiest answer. None of the good new languages are actually stable yet, and are missing some combination of good tooling, mature package management, and a good library ecosystem. I can forgive Java for a lot of sins because of that. But then again, college is lovely and instead of teaching students how to make the most of their IDEs, some of them teach javac with emacs with no libraries (or even Collections – yes I mean List and Map) allowed,, which is the stupidest crap ever.

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Vulture Culture posted:

I really hope Rust takes off soon because it has basically everything that makes Go good but also isn't awful in every other way

I've found a really good oracle for knowing whether or not a development tool is going to be a piece of crap is "did google make this?" If the answer is yes, then don't use it in your project for the love of god.

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Bruegels Fuckbooks posted:

I've found a really good oracle for knowing whether or not a development tool is going to be a piece of crap is "did google make this?" If the answer is yes, then don't use it in your project for the love of god.

You mean like Chrome?

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Bruegels Fuckbooks posted:

I've found a really good oracle for knowing whether or not a development tool is going to be a piece of crap is "did google make this?" If the answer is yes, then don't use it in your project for the love of god.

Guice? Guava?

fritz
Jul 26, 2003

Bruegels Fuckbooks posted:

I've found a really good oracle for knowing whether or not a development tool is going to be a piece of crap is "did google make this?" If the answer is yes, then don't use it in your project for the love of god.

Gtest is pretty good.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Bruegels Fuckbooks posted:

I've found a really good oracle for knowing whether or not a development tool is going to be a piece of crap is "did google make this?" If the answer is yes, then don't use it in your project for the love of god.

Yeah reason #220 I want to get out of this place is they've been slowly rewriting their .NET product in Google Web Toolkit for several years now. As soon as I can say I was here for a year on my resume :smithicide:

mrmcd
Feb 22, 2003

Pictured: The only good cop (a fictional one).

piratepilates posted:

Guice? Guava?

I like protobuf too.

I think the bigger problem is shops going "Hey I see Google's name attached to this, no need to be objective because it's obviously the best and most appropriate tool for the job. Meet your new engineering standards everyone!"

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Luigi Thirty posted:

Yeah reason #220 I want to get out of this place is they've been slowly rewriting their .NET product in Google Web Toolkit for several years now. As soon as I can say I was here for a year on my resume :smithicide:

I got curious and decided to see what the deal was at http://www.gwtproject.org/overview.html

GWT - pronounced «gwit» posted:

GWT is a development toolkit for building and optimizing complex browser-based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript. GWT is used by many products at Google, including AdWords, AdSense, Flights, Hotel Finder, Offers, Wallet, Blogger. It’s open source, completely free, and used by thousands of developers around the world.

Oh, well that sounds cool and good! I wonder what their approach is...

quote:

The GWT SDK contains the Java API libraries, compiler, and development server. It lets you write client-side applications in Java and deploy them as JavaScript.

:magical: sounds like they re-created ASP but with Java!?

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Munkeymon posted:

I got curious and decided to see what the deal was at http://www.gwtproject.org/overview.html


Oh, well that sounds cool and good! I wonder what their approach is...


:magical: sounds like they re-created ASP but with Java!?

Pretty much! They're reimplementing basically everything that ASP does automatically on the client end but in Java. It's an abortion. Other junior devs are like "why would I want to work here when nobody else uses this technology that they're going to cancel in 2 years like everything else they ever make?"

Progressive JPEG
Feb 19, 2003

Is this why visiting Google sites nowadays usually involves downloading multiple MBs?

https://docs.google.com

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Luigi Thirty posted:

Pretty much! They're reimplementing basically everything that ASP does automatically on the client end but in Java. It's an abortion. Other junior devs are like "why would I want to work here when nobody else uses this technology that they're going to cancel in 2 years like everything else they ever make?"

GWT is close to ten years old and is still being used for new projects at Google, so worrying about it being canceled is pretty dumb.

All of the things that they've said use it are pretty awful, so I suspect there's other good reasons to avoid it, though.

sink
Sep 10, 2005

gerby gerb gerb in my mouf

Doctor w-rw-rw- posted:

I dunno, Java is the easiest answer. None of the good new languages are actually stable yet, and are missing some combination of good tooling, mature package management, and a good library ecosystem. I can forgive Java for a lot of sins because of that. But then again, college is lovely and instead of teaching students how to make the most of their IDEs, some of them teach javac with emacs with no libraries (or even Collections – yes I mean List and Map) allowed,, which is the stupidest crap ever.

Scala is a kind of weird side effect of this. It became popular because it was an easy way to do 'more correct' programming without having to sacrifice much in terms of tooling or packages. Now that it has become pretty widely used, with its own ecosystem, it will forever be made slightly uglier than it could have been by its Java compatibility. I am glad we got what we did though, and I will happily take it as a manifestation of an enterprise functional programming language over that other Google abortion, Guava. I'll stop short of saying that uniformly all of the libraries/frameworks Google produces are garbage.

Some universities are offering Haskell for programming language courses. That's nice of them.

Cryolite
Oct 2, 2006
sodium aluminum fluoride
Are there any good resources out there for figuring out how much insurance, taxes, and all that actually cost as a contractor to make it worthwhile vs. being an employee?

I found out one of the contractors at my job (whose code is poo poo and we're firing) is making $150/hour. That seems like a lot to me. For 2000 hours a year that's $300k. The person who revealed this to me told me if I wanted to he could arrange for me to be a contractor for that much too.

Is $150/hour a lot? I currently make $135k a year as a full-time employee with benefits, vacation, 401k, and typical crap like that. Would it really not be that much of a bump after the additional taxes and insurance, or is it compelling? I really have no idea how much of a hassle it would be, or if I'd need a lawyer or something for the contract, or anything like that.

mrmcd
Feb 22, 2003

Pictured: The only good cop (a fictional one).

Cryolite posted:

Are there any good resources out there for figuring out how much insurance, taxes, and all that actually cost as a contractor to make it worthwhile vs. being an employee?

I found out one of the contractors at my job (whose code is poo poo and we're firing) is making $150/hour. That seems like a lot to me. For 2000 hours a year that's $300k. The person who revealed this to me told me if I wanted to he could arrange for me to be a contractor for that much too.

Is $150/hour a lot? I currently make $135k a year as a full-time employee with benefits, vacation, 401k, and typical crap like that. Would it really not be that much of a bump after the additional taxes and insurance, or is it compelling? I really have no idea how much of a hassle it would be, or if I'd need a lawyer or something for the contract, or anything like that.

I've not done this, but health insurance is like 6-12k / year for a single person depending on how old you are and how good the insurance is. The self-employed portion of social security is an extra 6% in taxes up to the cap.

But yeah, contractor rates are always going to be much higher than salaried rates to compensate for the fact you might not always be working full time, you're not paid for vacations or days off, the client has flexibility on how much to work you, extra expenses for taxes and benefits, etc. If you have lots of good gigs it can be very lucrative, but there's always the risk of lean years too.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
If you're young and healthy you can go as low as $2k/year for emergency-only health insurance, but it can be $10k+ for real coverage (or more if you have a family). If you're guaranteed 40 hours per week then you can hit 2000 hours with ~13 days off, but keep in mind that holidays and sick time come out of that, so you generally won't actually be able to get 2 weeks of vacation and still hit 2000 hours without OT. Tax-wise you're looking at another 15% between SS and having to pay both halves of the payroll tax. The cost of losing your 401k benefits should be obvious.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Plorkyeran posted:

If you're young and healthy you can go as low as $2k/year for emergency-only health insurance, but it can be $10k+ for real coverage (or more if you have a family). If you're guaranteed 40 hours per week then you can hit 2000 hours with ~13 days off, but keep in mind that holidays and sick time come out of that, so you generally won't actually be able to get 2 weeks of vacation and still hit 2000 hours without OT. Tax-wise you're looking at another 15% between SS and having to pay both halves of the payroll tax. The cost of losing your 401k benefits should be obvious.

Yeah, and "healthy" can very abruptly turn into "unhealthy", then you're major-league hosed.

Adbot
ADBOT LOVES YOU

Progressive JPEG
Feb 19, 2003

I've been told before that to break even, a contract position should pay twice as much as a salary position.

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