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
ultrafilter
Aug 23, 2007

It's okay if you have any questions.


22 Eargesplitten posted:

Well, it looks like I'm going to be onboarding / mentoring with one of my company's programmers, which is pretty awesome since I'm normally T1 helpdesk. I haven't gotten sure word for what languages will be used, but I know it will be making something that interacts with a database. I don't know any DB-related languages, is there anything I can study to get a general idea about them, or do I need to know SQL vs Ruby vs whatever else I haven't heard of?

Start reading up on SQL. Your project is going to involve that in some way.

Adbot
ADBOT LOVES YOU

22 Eargesplitten
Oct 10, 2010



Thanks. That's what I was thinking, but I wanted to make sure. Is there a particular flavor I should go for? I know there's a bunch of different versions, although I only really know of noSQL and mySQL. Or is the core common enough that it doesn't matter?

Fergus Mac Roich
Nov 5, 2008

Soiled Meat

22 Eargesplitten posted:

Thanks. That's what I was thinking, but I wanted to make sure. Is there a particular flavor I should go for? I know there's a bunch of different versions, although I only really know of noSQL and mySQL. Or is the core common enough that it doesn't matter?

There's actually a standard-based language called SQL. MySQL is just a particular database technology; it does have a few of its own SQL extensions, but you don't need to worry about that right now unless they tell you your project will use a MySQL database. NoSQL databases don't use SQL, hence the name.

Hadlock
Nov 9, 2004

I think microsoft has a dummy db you can download and play around with. It's a lot easier to pick up if there's a good data set you understand, instead of trying to learn using tiny tables with fake data.

And yeah, SQL is SQL is SQL. There are some fancy vendor-specific SQL statements, Microsoft has their own called T-SQL which has cool stuff like MAX and a few others that I use as crutches in my day to day stuff.

Start off doing a bunch of SELECT queries, left joins, right joins etc etc., probably whatever data set you're working with you'll figure it out pretty quick, SQL is pretty drat basic so you can pick it up easy.

I picked up the bare bones basics in 2-4 days, and was writing pretty decent queries within 2-3 weeks.

Kuule hain nussivan
Nov 27, 2008

How does $("#h1").length work in JavaScript? Does it count the number of h1 elements present, or the length of the content in the first h1 element present?

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.

22 Eargesplitten posted:

Thanks. That's what I was thinking, but I wanted to make sure. Is there a particular flavor I should go for? I know there's a bunch of different versions, although I only really know of noSQL and mySQL. Or is the core common enough that it doesn't matter?

Check out http://sqlzoo.net/

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.

Kuule hain nussivan posted:

How does $("#h1").length work in JavaScript? Does it count the number of h1 elements present, or the length of the content in the first h1 element present?

JQuery selectors that return by id only return one element. "#h1" is a jquery selector that returns the element with "id" h1. It will always select one element (id should be unique in a document). If you want to return all h1 elements, use selector "h1" (e.g. $("h1").length. Read this: https://api.jquery.com/category/selectors/

Kuule hain nussivan
Nov 27, 2008

Bruegels Fuckbooks posted:

JQuery selectors that return by id only return one element. "#h1" is a jquery selector that returns the element with "id" h1. It will always select one element (id should be unique in a document). If you want to return all h1 elements, use selector "h1" (e.g. $("h1").length. Read this: https://api.jquery.com/category/selectors/
So it's a jquery function? Good to know, I'll check out the documentation. The material I'm using is really bad at telling you what comes from what.

Linear Zoetrope
Nov 28, 2011

A hero must cook
This is going to be a bit weird, but I just changed a couple of recursive methods into an iterative version, but while doing the conversion, I recognized a couple of small deficiencies in the recursive version. I'm using a local git and while the exact problems are on my mind, I'd like to fix them and insert them into the history in case I have to roll back to the recursive version for some reason. So I have a history like

stuff -> recursive -> iterative

and I'd like it to be

stuff -> recursive -> recursive improvement -> iterative

What's the easiest flow to do this sort of time travel? Would just branching from the most recent pre-iterative commit, fixing it, and merging it back in likely work?

(This repository is only seen by me, so time travel isn't super evil)

raminasi
Jan 25, 2005

a last drink with no ice
Assuming you have a branch A at iterative: make a new branch B at recursive, apply your fixes, rebase A on B, delete B.

ExcessBLarg!
Sep 1, 2001

GrumpyDoctor posted:

Assuming you have a branch A at iterative: make a new branch B at recursive, apply your fixes, rebase A on B, delete B.
Basically this. In the last step, when you rebase A on B, it's going to complain about merge conflicts. If you just want to keep the result of the iterative version, you can use "git rebase -X theirs B" to force it to resolve conflicts with the iterative version.

KICK BAMA KICK
Mar 2, 2009

Hadlock posted:

Coursera offers the Stanford Crypto course for FREE and I highly recommend doing it. It just started Monday so you're not at a disadvantage. The lecture video player has a 1.25x and 1.5x speed adjustment which makes it easy to blow through the lectures a second or third time to really embed the info in your brain. I did it about two years ago and it really broadened my perception of how all that works and why there's really only about 100 people on the planet qualified to write commercial grade crypto-anything, and why WEP is such a flaming pile of garbage.

https://www.coursera.org/course/crypto
Just wanna chime in that this course looks great; I had already signed up for it before I read this post but just now got around to watching the lectures. It's pitched right at the point where I am following everything, but just barely, so I know I'm learning something. I don't have any real use for crypto knowledge and was just looking for something that started about when I'd be finishing the two-part Rice algorithms class (good lectures, hated interacting with their provided code), but this seems pretty interesting so far. Also the assignments that go with each week of lectures are not due for like three weeks after the lectures drop, so you still have plenty of time.

Mellow_
Sep 13, 2010

:frog:

Kuule hain nussivan posted:

So it's a jquery function? Good to know, I'll check out the documentation. The material I'm using is really bad at telling you what comes from what.

As far as I know, anything that begins with a $ is jquery.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

AuxPriest posted:

As far as I know, anything that begins with a $ is jquery.

By convention...

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.

AuxPriest posted:

As far as I know, anything that begins with a $ is jquery.

Angular uses the $ in front of a lot of crap, but $. is jquery namespace.

I give people a free pass because it's kinda hard to google "what does $(whatever) do"?

darthbob88
Oct 13, 2011

YOSPOS

Bruegels Fuckbooks posted:

Angular uses the $ in front of a lot of crap, but $. is jquery namespace.

I give people a free pass because it's kinda hard to google "what does $(whatever) do"?

Prototype.js also uses the $ alias, and I think another client-side library as well. At this point I just type out jQuery everywhere, it's easier than wrangling those conflicts across all my clients.

Storgar
Oct 31, 2011
I'm trying to move my C/C++ development to linux. What are some popular toolchains for this?

I'm currently just messing around with vi/g++/custom Makefile/gdb but I don't know how well that is going to translate to a somewhat bigger project. What do you guys like to use? Eclipse? Qt, code::blocks, sublime...etc?

What's a nice C++ debugger?

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
There was a period where pretty much every manipulation library tried to take the $ identifier if it wasn't already, pretty sure jQuery, Prototype, MooTools and Dojo all did it.

dhrusis
Jan 19, 2004
searching...
hey all quick question - I have lithium hosting and I want to quickly upload code that i'm editing so that its live on the site -- do you guys have a recommendation for an all in 1 text editor/IDE + FTP uploader?

I have sublimetext but I'm not sure if it does FTP yet

languages: php, angular, CSS

dhrusis fucked around with this message at 04:14 on Aug 9, 2015

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Throw the appropriate rsync line into a .sh file and wire up a hotkey in your editor to invoke it.

Extortionist
Aug 31, 2001

Leave the gun. Take the cannoli.
There's an SFTP plugin for sublime but it kinda sucks and costs $20. Not sure of your OS but for Windows I just use WinSCP, you can set it to monitor a local directory and automatically upload changes to a remote dir.

MrMoo
Sep 14, 2000

dhrusis posted:

I have sublimetext but I'm not sure if it does FTP yet

Do you have SSH access?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

JetBrains IDEs excel at remote code editing.

PHPStorm is also a good JS and CSS IDE.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
I'm going to be the voice of reason and say "just dont' do it."

Or, more specifically, make it extremely difficult for yourself to edit code on the server. Instead, you should be writing and testing all of your code locally and deploying to the server in one go.

dhrusis
Jan 19, 2004
searching...
thanks all for the recommendations -- I like the idea of doing local development/testing, so I'll go that route for now... Appreciate it!

Munkeymon
Aug 14, 2003

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



Maluco Marinero posted:

There was a period where pretty much every manipulation library tried to take the $ identifier if it wasn't already, pretty sure jQuery, Prototype, MooTools and Dojo all did it.

Also Chrome aliases (I think) querySelectorAll to $ and $x does xpath evaluation which is great because xpath :3:

feedmegin
Jul 30, 2008

dhrusis posted:

hey all quick question - I have lithium hosting and I want to quickly upload code that i'm editing so that its live on the site -- do you guys have a recommendation for an all in 1 text editor/IDE + FTP uploader?

I have sublimetext but I'm not sure if it does FTP yet

languages: php, angular, CSS

emacs can do that. :sun:

http://www.gnu.org/software/emacs/manual/html_node/emacs/Remote-Files.html

Peristalsis
Apr 5, 2004
Move along.
Does anyone here have experience switching away from Ruby on Rails? I've investigated it a little, and I don't think another platform is going to give us any real technical advantages, but it might make it easier to hire people with skills we need if we use some more common tools.

We probably won't change, it's just coming up because we're trying to hire another developer right now, and our applicant pool so far is pretty underwhelming. We also have a couple of new projects coming up, and if we were to switch, now would be a good time in terms of starting new projects with the new platform.

If we were to change, we'd probably end up going with Python and one of its web frameworks. With only two developers (assuming we can hire the second one in short order), and a small client base, computational efficiency isn't going to be as much of a concern to us as powerful tools and short development times.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Peristalsis posted:

Does anyone here have experience switching away from Ruby on Rails? I've investigated it a little, and I don't think another platform is going to give us any real technical advantages, but it might make it easier to hire people with skills we need if we use some more common tools.

We probably won't change, it's just coming up because we're trying to hire another developer right now, and our applicant pool so far is pretty underwhelming. We also have a couple of new projects coming up, and if we were to switch, now would be a good time in terms of starting new projects with the new platform.

If we were to change, we'd probably end up going with Python and one of its web frameworks. With only two developers (assuming we can hire the second one in short order), and a small client base, computational efficiency isn't going to be as much of a concern to us as powerful tools and short development times.

Why not just hire a good developer who's willing to learn Rails? I didn't know it at all, applied for a Rails job, bought a book and learned for a week and completed the coding test and got the job.

It seems easier to have a php guy learn Rails than switch languages and frameworks.

Peristalsis
Apr 5, 2004
Move along.

Bob Morales posted:

Why not just hire a good developer who's willing to learn Rails? I didn't know it at all, applied for a Rails job, bought a book and learned for a week and completed the coding test and got the job.

It seems easier to have a php guy learn Rails than switch languages and frameworks.

That's what we've been trying to do, but it's frustrating to be in a continuous cycle of training short-timers. It wastes my time trying to get someone else up to speed (and I've spent all day today researching interview questions, rather than getting real work done), it means they are jumping into a technology they may or may not end up liking or wanting to use, and I don't enjoy (and I'm not good at) teaching. Frankly, I'd like to hire someone who's better at it than I am, so I could use them as a resource, instead of them expecting me to be an expert at this stuff. Some of this frustration has been due to hiring student interns, so hopefully hiring a real live grown up will be a better experience.

I guess I asked because I'm not married to RoR, and wondered if anyone found moving away from Rails to be a particularly good or bad experience. I also doubt that we'd be able to spend resources to convert our existing RoR apps to the new platform, which means we'd be stuck with RoR for the foreseeable future anyway.

midnightclimax
Dec 3, 2011

by XyloJW
What finance APIs for stock data do you guys use? I googled a bit and there's a dozen to pick from, not sure if I should just go with Yahoo. It's for a personal application, nothing big, just learning to program and looking for data to mess with.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Peristalsis posted:

That's what we've been trying to do, but it's frustrating to be in a continuous cycle of training short-timers. It wastes my time trying to get someone else up to speed (and I've spent all day today researching interview questions, rather than getting real work done), it means they are jumping into a technology they may or may not end up liking or wanting to use, and I don't enjoy (and I'm not good at) teaching. Frankly, I'd like to hire someone who's better at it than I am, so I could use them as a resource, instead of them expecting me to be an expert at this stuff. Some of this frustration has been due to hiring student interns, so hopefully hiring a real live grown up will be a better experience.

I guess I asked because I'm not married to RoR, and wondered if anyone found moving away from Rails to be a particularly good or bad experience. I also doubt that we'd be able to spend resources to convert our existing RoR apps to the new platform, which means we'd be stuck with RoR for the foreseeable future anyway.

When you say "short-timers" do you mean that it's a short-term position, or that people give up and quit quickly? Because the lack of applications could very well be that people don't want to learn a new platform to apply for a job that isn't going to last.

If you need to staff short term positions, you might have more luck going through a staffing company that specializes in developers. A friend of mine who does test engineering has been staffed to several short-term dev jobs through company like that.

Peristalsis
Apr 5, 2004
Move along.

LeftistMuslimObama posted:

When you say "short-timers" do you mean that it's a short-term position, or that people give up and quit quickly? Because the lack of applications could very well be that people don't want to learn a new platform to apply for a job that isn't going to last.

If you need to staff short term positions, you might have more luck going through a staffing company that specializes in developers. A friend of mine who does test engineering has been staffed to several short-term dev jobs through company like that.

Sorry, I meant people haven't been sticking with the jobs here very long. It's a permanent position, but at a research unit in a state university. This means the pay isn't great, funding is always an issue, and career advancement generally requires finding a different job. When I signed on in October of 2012, I had a boss, another developer, and 2 student interns as coworkers. By the end of the year, the boss and the coworker had left for greener pastures, one of the two students had vanished and there was a restructuring so that my boss's boss's boss was now my direct supervisor. The student who stuck around became the second full-time developer after he graduated in 2013, but he left last month, and we're trying to replace him. Other students came and went all the time, so we just sort of stopped hiring them (I hope). Honestly, it's the endless parade of students who can't tie their own shoes that mostly has me burned out on training people. That's not the fault of the person we'll be hiring, but it's doesn't make it any less annoying.

While I hope our upcoming projects will be interesting, the work so far has also been fairly mundane. That doesn't help with employee (or student) retention.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Peristalsis posted:

Sorry, I meant people haven't been sticking with the jobs here very long. It's a permanent position, but at a research unit in a state university. This means the pay isn't great, funding is always an issue, and career advancement generally requires finding a different job. When I signed on in October of 2012, I had a boss, another developer, and 2 student interns as coworkers. By the end of the year, the boss and the coworker had left for greener pastures, one of the two students had vanished and there was a restructuring so that my boss's boss's boss was now my direct supervisor. The student who stuck around became the second full-time developer after he graduated in 2013, but he left last month, and we're trying to replace him. Other students came and went all the time, so we just sort of stopped hiring them (I hope). Honestly, it's the endless parade of students who can't tie their own shoes that mostly has me burned out on training people. That's not the fault of the person we'll be hiring, but it's doesn't make it any less annoying.

While I hope our upcoming projects will be interesting, the work so far has also been fairly mundane. That doesn't help with employee (or student) retention.

Yeah, if the work is boring, there's no room for advancement, and the pay is low then that is probably why you're not getting applications, nothing to do with Ruby.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

midnightclimax posted:

What finance APIs for stock data do you guys use? I googled a bit and there's a dozen to pick from, not sure if I should just go with Yahoo. It's for a personal application, nothing big, just learning to program and looking for data to mess with.

If you just need daily data yahoo's is really easy to work with.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

LeftistMuslimObama posted:

Yeah, if the work is boring, there's no room for advancement, and the pay is low then that is probably why you're not getting applications, nothing to do with Ruby.

And that won't change just because you change technology, boring work is boring whether it's in JavaScript, Ruby, Python or brainfuck. The errors people make are different though, so there might be a case to be made for making whatever's in your tech more accessible.

I think there's a lot of room for good poo poo to happen for places that look after their juniors, (a road I'm just starting on, having freelanced for the last 2 years and taking on my first part time this week), but it does require a disposition to teaching (err, patience) and a well isolated development process so you can split up work into little digestible chunks.

Of course, as a freelancer I can do whatever the gently caress I like as long as the billables roll on and clients are happy, so that gives me more freedom than most to do this stuff.

Peristalsis
Apr 5, 2004
Move along.

LeftistMuslimObama posted:

Yeah, if the work is boring, there's no room for advancement, and the pay is low then that is probably why you're not getting applications, nothing to do with Ruby.

Maluco Marinero posted:

And that won't change just because you change technology, boring work is boring whether it's in JavaScript, Ruby, Python or brainfuck. The errors people make are different though, so there might be a case to be made for making whatever's in your tech more accessible.

It's not a Stalinesque, soul-draining sweatshop, it's just not sexy work. Frankly, I like the job pretty well, at least so far. I've learned a new platform, taken classes to finish out a certification, I have a 40 hour workweek, decent benefits, access to campus gyms for a pittance, and plenty of time to use them. I also get to spend time around smart people, instead of in a dingy cube farm of dull people whining about how much they hate work/life. I'm just wondering if switching away from Rails would be especially easy or hard, on the assumption that if we used a more common platform, we'd have more luck finding people who already know it, and I could spend less of my time training people who are probably just going to leave in a year or two. For the record, we have 10 applicants, and exactly one of them claims RoR experience.

Maluco Marinero posted:

I think there's a lot of room for good poo poo to happen for places that look after their juniors, (a road I'm just starting on, having freelanced for the last 2 years and taking on my first part time this week), but it does require a disposition to teaching (err, patience) and a well isolated development process so you can split up work into little digestible chunks.

I'm not sure what you're getting at here. If you're talking about mentoring/training people so they feel loyal or inspired or whatever, that's all well and good, but our institute may not even exist after our current grant is up, 2 or 3 years from now. Or it could get another 5 years. Or something completely different may happen. Regardless, as long as we're hiring someone, I'd prefer a person to bounce ideas off of, rather than someone I have to explain things to. When I first got out of grad school, I spent a year and a half as an adjunct instructor at community colleges, and I got my fill of explaining things then. God, that seems like a lifetime ago.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
Thing is, that person will cost money, is attracted to interesting work, and people with deeper pockets than you want them. Sounds like there's not a lot you can do to change that. The hiring pool is full to the brim with juniors, and drained of all the seniors thanks to the tech buble. It is what it is.

IT BEGINS
Jan 15, 2009

I don't know how to make analogies
Small refactoring question here. I've got some code that looks like the following:

php:
<?
protected function x($params)
{
    if ($params['conditional']) {
        // do some stuff
    }
    if ($params['some_other_conditional']) {
        // do some other stuff
    }
    // do lots of stuff
    if ($params['last_conditional']) {
        // do some final stuff
    }
}
?>
I am planning to refactor this - first to extract stuff into methods, then later into subclasses or extract them into other class for composition. However, in the meantime, I'd like to clean up the method first. Should I do this:

php:
<?
protected function x($params)
{
    if ($params['conditional']) {
        $this->doSomeStuff();
    }
    if ($params['some_other_conditional']) {
        $this->doSomeOtherStuff();
    }
    $this->doLotsOfStuff();
    if ($params['last_conditional']) {
        $this->doSomeFinalStuff();
    }
}
?>
where my conditionals are obvious, or this:

php:
<?
protected function x($params)
{
    $this->doSomeStuff($params);
    $this->doSomeOtherStuff($params);
    $this->doLotsOfStuff($params);
    $this->doSomeFinalStuff($params);
}
?>
where I place the conditionals into the extracted methods? I like the latter more but I think it's less obvious that sometimes things won't be executed. Thoughts?

Adbot
ADBOT LOVES YOU

program666
Aug 22, 2013

A giant carnivorous dinosaur
So, there is pretty much no way to program for android without using eclipse right (or some other IDE)? I tend to avoid using this stuff and when I programmed for j2me I used some very minimalistic program (that I forgot the name of) that would create the project structure and that was about it if I recall correctly, even compiling I was able to do with a simple command line I think. I'm looking for something like that for android but I guess it doesn't exist right?

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