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
coaxmetal
Oct 21, 2010

I flamed me own dad
honestly I'm not sure what kind I would want to do, it was just a though. Like algorithms would be cool, but I'm not smart enough to do that anyway.

Adbot
ADBOT LOVES YOU

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

The only time I've seen Master's degrees mean something in the CS field is one of:
- Resume bait for investors at a startup
- Academic crazy advanced research

So if you're doing either of those it's probably a good idea!

Strong Sauce
Jul 2, 2003

You know I am not really your father.





Google likes it if you're at least a Masters. If you're going to be a Masters, why not just go all the way and do the PhD?

You can probably earn and learn more just working at a good place though.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Strong Sauce posted:

If you're going to be a Masters, why not just go all the way and do the PhD?

Because the two degrees aren't even remotely comparable?

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe

Strong Sauce posted:

Google likes it if you're at least a Masters. If you're going to be a Masters, why not just go all the way and do the PhD?

You can probably earn and learn more just working at a good place though.

Probably? You can *definitively* learn more by getting a decent job than you can in grad school. I held a job for 6 months before leaving to go get my masters. I learned more in my first month working than I did in my 2 years of grad school.

I, honestly, don't really see the value in getting a masters unless you really want a job that requires one.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

clockwork automaton posted:

Probably? You can *definitively* learn more by getting a decent job than you can in grad school. I held a job for 6 months before leaving to go get my masters. I learned more in my first month working than I did in my 2 years of grad school.

I, honestly, don't really see the value in getting a masters unless you really want a job that requires one.

More in depth knowledge of things that you might have glossed over in under grad.

Khelmar
Oct 12, 2003

Things fix me.
Anyone have a quick formula to determine total number of items from a range list?

I've got a field that would be specified like a page range - something like 1-3,4,5, and I'm looking for a simple way to get the total number of items out. Anyone have a code snippet for this lying around?

baquerd
Jul 2, 2007

by FactsAreUseless

Khelmar posted:

Anyone have a quick formula to determine total number of items from a range list?

I've got a field that would be specified like a page range - something like 1-3,4,5, and I'm looking for a simple way to get the total number of items out. Anyone have a code snippet for this lying around?

If the only two syntax characters are "-" and "," then this. It doesn't check for duplicates though, you'll need some more logic if you care about that.

code:
#!/usr/bin/perl

my $string = $ARGV[0];
my $total = 0;
foreach my $val (split(/,/, $string)) {
        if ($val =~ m/\s*(\d+)\s*-\s*(\d+)\s*/) {
                $total += abs($1-$2) + 1;
        } elsif ($val =~ m/\s*(\d+)\s*/) {
                $total++;
        } else {
                print "bad format on $val\n";
        }
}
print "$total pages found\n";

Khelmar
Oct 12, 2003

Things fix me.
Thanks! It's not critical there's no dupes, so that should work!

TheQuagmire
May 14, 2008

by Y Kant Ozma Post
I've spent a very long time trying to figure where to ask this so here goes.

I am in search of a script/software which will allow me to "scan" am entire sites source code on every accessible page without having to manually go from page to page doing a source check, and search for specific words or phrases. (if that's possible)

So if anyone knows the way, guide me :P or at least a place to start.

Johnny Cache Hit
Oct 17, 2011

TheQuagmire posted:

I've spent a very long time trying to figure where to ask this so here goes.

I am in search of a script/software which will allow me to "scan" am entire sites source code on every accessible page without having to manually go from page to page doing a source check, and search for specific words or phrases. (if that's possible)

So if anyone knows the way, guide me :P or at least a place to start.

I think wget has a --spider option that will crawl all links on a page. Then you can just grep the downloaded pages for whatever you are looking for. curl probably has a similar flag as well.

Not sure it recurses, though, so check the manpage for that.

ToxicFrog
Apr 26, 2008


Kim Jong III posted:

I think wget has a --spider option that will crawl all links on a page. Then you can just grep the downloaded pages for whatever you are looking for. curl probably has a similar flag as well.

Not sure it recurses, though, so check the manpage for that.

--spider doesn't actually download the pages, it just checks that they exist.

You probably want something like wget -x -w 1 -r -l inf url followed by grep -r on the resulting downloaded source. You may also need -e robots=off.

You could also use -O - and pipe the output straight to grep, but this may make it hard to figure out which file on the server each result appears in, if that's important to you.

Nippashish
Nov 2, 2005

Let me see you dance!

clockwork automaton posted:

Probably? You can *definitively* learn more by getting a decent job than you can in grad school. I held a job for 6 months before leaving to go get my masters. I learned more in my first month working than I did in my 2 years of grad school.

I, honestly, don't really see the value in getting a masters unless you really want a job that requires one.

I don't think this is really a fair characterization (or your experience was quite different than mine). I learned very different things on the job than I did during my masters, but trying to pin down where I learned more kind of misses the point for me.

That said, afaik a master's won't qualify you for a "research" position. Microsoft Research (for example) pretty much only hires PhDs.

coaxmetal
Oct 21, 2010

I flamed me own dad
cool. I don't really want to go for a phd so instead ill probably go for a better job.

Not My Leg
Nov 6, 2002

AYN RAND AKBAR!

ultrafilter posted:

Because the two degrees aren't even remotely comparable?

Is a masters program in CS significantly different from a PhD program in CS. I ask because I know that in a lot of fields a Masters Degree is what gets awarded to someone who couldn't complete a PhD program, rather than being viewed as a legitimate standalone degree. It sounds like that isn't the case in CS, that someone in a Masters would actually be doing different work than someone in the first couple years of a PhD program.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
It depends on the school. At mine the Masters program was basically a slightly more advanced version of the undergrad degree crammed into fewer years and was mostly targeted at people with an undergrad degree in a different field or from a terrible school, but I do know a few people who got Masters degrees in CS by dropping out of PhD programs.

downout
Jul 6, 2009

I'm making an android app in eclipse, but I'm having a weird problem. When I try to edit an xml file lines are being changed randomly just by clicking on them. For example the file will initially read like this:

code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="fill_parent" 
              android:layout_height="fill_parent" 
              android:orientation="vertical" >
    <TextView android:id="@+id/text"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Hello, I am a TextView" />
    <Button android:id="@+id/button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello, I am a Button" />
</LinearLayout>
Then I will click on a line, say the second line that reads "android:layout_width="fill_parent"", and then click on the fourth line that reads "android:orientation="vertical" >". It changes the fourth line so that the code now looks like this:

code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="fill_parent" 
              android:layout_height="fill_parent" 
              android:layout_width="fill_parent"
    <TextView android:id="@+id/text"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Hello, I am a TextView" />
    <Button android:id="@+id/button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello, I am a Button" />
</LinearLayout>
If I click on another line in the code it will change it to the previous line the cursor was in. I have no idea why this is happening. Insert isn't on and I'm not copying the line. It happens anytime I move my cursor to another line with a mouse click. Anyone had a similar problem in Eclipse or know of a solution?

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
People who wash out of CS PhD programs frequently get MS's for their trouble (n.b. I am in this set). Usually this is some generic MS in Computer Science in the track of their research. Some schools don't actually have a generic CS MS program, and some only offer this degree to wash-outs. A lot of MS programs don't have an analogous PhD program.

It's common for a PhD program to be quite similar to an MS program for the first two years; basically it's an MS with a more specialized course load and an expectation that you'll be starting to do research part-time with your advisor. If your MS requires a thesis (they don't all), you may be doing that anyway. After that, it's usually 1-3 years of advisor-directed research and then 1-3 years of dedicated work on your dissertation topic.

Having a PhD is almost always an absolute requirement for getting hired as a research professor, although you can sometimes do CS research without a PhD under a different title, like "research programmer". Having a PhD helps a lot if you want to teach CS at the collegiate level; having at least an MS is basically mandatory. Industry treats advanced degrees as a signaling mechanism, and not a purely positive signal at that. HR departments respect them; engineering groups generally have an attitude about PhDs that I would describe as "curious but wary", unless the group specializes in a field with strong research ties (like compilers or (maybe) graphics). It is very common to never again work on a topic related to your thesis, or even want to.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Suppose I want to build a structure that looks like this: The top-level object is a list of objects, each of which can be either an atomic object or itself a list. The structure is meant to be operated upon by "workers" which can move backwards and forwards along lists, climb upwards (if they are not at the top level) and climb downwards (if the object they are positioned at is a sublist). If they climb upwards, they will then be pointing at the same list item that they were pointing at before they descended. Workers can insert elements in the list. Multiple workers may be operating on the same list.

Each list has no reference to its parent element; so a particular list can be inserted by value or by reference in multiple locations (and manipulating the list in one of these locations causes the changes to be made everywhere else that a reference has been placed to the same list). Workers can create workers "constrained" to act within the current list (so the newly produced worker regards the current level as being the top level, whereas it may not be the top level as far as the original worker was concerned).

Inserting a list item in such a way as to form a cycle might or might not be allowed. Or maybe when a sublist is inserted it should be marked as "unsafe" until a check has been made for cycles, or something. If deletion of list items is allowed, then deleting sublists might be problematic, because another worker might be working inside that sublist, and then it is not clear what should happen.

Does a structure like this have a name?

shrughes
Oct 11, 2008

(call/cc call/cc)

Hammerite posted:

Suppose I want to build a structure that looks like this: The top-level object is a list of objects, each of which can be either an atomic object or itself a list. The structure is meant to be operated upon by "workers" which can move backwards and forwards along lists, climb upwards (if they are not at the top level) and climb downwards (if the object they are positioned at is a sublist). If they climb upwards, they will then be pointing at the same list item that they were pointing at before they descended. Workers can insert elements in the list. Multiple workers may be operating on the same list.

Each list has no reference to its parent element; so a particular list can be inserted by value or by reference in multiple locations (and manipulating the list in one of these locations causes the changes to be made everywhere else that a reference has been placed to the same list). Workers can create workers "constrained" to act within the current list (so the newly produced worker regards the current level as being the top level, whereas it may not be the top level as far as the original worker was concerned).

Inserting a list item in such a way as to form a cycle might or might not be allowed. Or maybe when a sublist is inserted it should be marked as "unsafe" until a check has been made for cycles, or something. If deletion of list items is allowed, then deleting sublists might be problematic, because another worker might be working inside that sublist, and then it is not clear what should happen.

Does a structure like this have a name?

Other than a "graph" or "directed acyclic graph", it sounds like you're making a filesystem (which is not the name of a data structure).

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

TheQuagmire posted:

I've spent a very long time trying to figure where to ask this so here goes.

I am in search of a script/software which will allow me to "scan" am entire sites source code on every accessible page without having to manually go from page to page doing a source check, and search for specific words or phrases. (if that's possible)

So if anyone knows the way, guide me :P or at least a place to start.

There's a thread dedicated to scraping in SH/SC already actually so you should probably check there. Most of it is scripting around wget/cURL though if you're savvy with those.

EDIT-It's here: http://forums.somethingawful.com/showthread.php?threadid=3484002

Scaramouche fucked around with this message at 22:40 on May 15, 2012

etcetera08
Sep 11, 2008

Is Design Patterns still worth reading? I'm taking an OOP class in the fall and am interested in learning some higher level concepts than "OOP is like when you have a CheckingAccount class inherit from a BankAccount class," which is pretty much all we did in the pre-req course. I think we're using Horstmann's OOP book for the actual course so I'm not sure how much overlap there is between that and Design Patterns?

shrughes
Oct 11, 2008

(call/cc call/cc)

etcetera08 posted:

Is Design Patterns still worth reading? I'm taking an OOP class in the fall and am interested in learning some higher level concepts than "OOP is like when you have a CheckingAccount class inherit from a BankAccount class," which is pretty much all we did in the pre-req course. I think we're using Horstmann's OOP book for the actual course so I'm not sure how much overlap there is between that and Design Patterns?

There are two design patterns that have anything to do with OOP.

One is having virtual methods and having subclasses that override them.
The other is the visitor pattern.


A small section of the book covers design patterns that are not OOP-specific.

It is not regarded as a well-written book.

Thermopyle
Jul 1, 2003

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

A friend of mine is considering writing an application and using Adobe AIR. My general feeling is that AIR is a dead end and won't be supported much longer by Adobe, but I can't say why that's my feeling. Since I don't know jack poo poo about Adobe products, could someone tell me anything about the future of AIR? Is using it for a sizable client-side application (personal money management) a dumb idea?

Suspicious Dish
Sep 24, 2011

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

etcetera08 posted:

Is Design Patterns still worth reading? I'm taking an OOP class in the fall and am interested in learning some higher level concepts than "OOP is like when you have a CheckingAccount class inherit from a BankAccount class," which is pretty much all we did in the pre-req course. I think we're using Horstmann's OOP book for the actual course so I'm not sure how much overlap there is between that and Design Patterns?

A large amount of the patterns in GoF feel like they're just workarounds for the lack of first-class functions. A large number of them also don't feel notable.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
The definition of "design pattern" is basically "a nifty trick to work around a shortcoming in your language of choice".

etcetera08
Sep 11, 2008

Cool, I'll skip it then. Thanks for the info.

tef
May 30, 2004

-> some l-system crap ->
design patterns are names we give to boilerplate.

the authors of the design patterns book, the gang of four, were found guilty at a show trial at oopsla :v:

Suspicious Dish
Sep 24, 2011

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

etcetera08 posted:

Cool, I'll skip it then. Thanks for the info.

It's worth having on your shelf if you're an enterprise Java programmer. It's one of those books that everybody buys, everybody says they've read, and nobody has.

If nothing else, it's a great showcase of how with a bit of a change in tone (the book is very authoritative, textbook-like almost), you can build a cult around a new bandwagon.

Doctor w-rw-rw-
Jun 24, 2008

Thermopyle posted:

A friend of mine is considering writing an application and using Adobe AIR. My general feeling is that AIR is a dead end and won't be supported much longer by Adobe, but I can't say why that's my feeling. Since I don't know jack poo poo about Adobe products, could someone tell me anything about the future of AIR? Is using it for a sizable client-side application (personal money management) a dumb idea?

Based not off of my experiences, but by coworkers at a past job at a reasonably well-off company - so take with a grain of salt and no, I don't know details: Font kerning sucks (the letter 'w' might have spacing issues. Maybe they fixed this). Platform bugs that manifest on OS X but not Windows and vice versa. Linux? Good loving luck. Long running anything? Single thread, single task queue, for the whole app (or something like that?). Notifications (i.e. Growl-like) are a pain. Avoid Flex. Java might be write once test everywhere, but AIR is write once, test everywhere, curse at the platform-specific fixes (if they are indeed fixable), and repeat until *gently caress it, we're going live*.

And Adobe has seen the light anyways, and it knows that Flash isn't the revolutionary competitive platform on mobile it was hoping it would be. Adobe themselves are investing in HTML5/buzzwords/etc. for the future. Flash isn't a dying platform, it's an undead platform, because it 's still around (of course it's still everywhere), and isn't going away - but it's not particularly alive, either.

Doctor w-rw-rw- fucked around with this message at 04:50 on May 16, 2012

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Suspicious Dish posted:

It's worth having on your shelf if you're an enterprise Java programmer. It's one of those books that everybody buys, everybody says they've read, and nobody has.

gently caress that get go all out with Patterns of Enterprise Application Architecture.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Suspicious Dish posted:

It's worth having on your shelf if you're an enterprise Java programmer. It's one of those books that everybody buys, everybody says they've read, and nobody has.

I was once a Java programmer. Bought the book since my co-workers were always going on about patterns. Never read it, quit the job because gently caress Java. :smug:

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker

Suspicious Dish posted:

A large amount of the patterns in GoF feel like they're just workarounds for the lack of first-class functions. A large number of them also don't feel notable.

I've never heard patterns described like this but it makes perfect sense.

Doctor w-rw-rw- posted:

Flash isn't a dying platform, it's an undead platform, because it 's still around (of course it's still everywhere), and isn't going away - but it's not particularly alive, either.

So like java? :that emoticon tef uses all the time:

Rick Rickshaw
Feb 21, 2007

I am not disappointed I lost the PGA Championship. Nope, I am not.
Does anyone know of a way to easily generate lookup tables based on HTML form elements?

I've done this before using a series of Notepad++ macros, but it was hardly the most efficient way.

Perhaps a more succinct way to word this, is how can I select only these types of tags from an HTML document?

code:
<select class="EditField" name="field_dataReason" id="field_dataReason" onchange="show_reason_other_field();">
	<option value=""></option>
	<option value="1">New Patient</option>
	<option value="2">Annual Visit</option>
	<option value="3">Post Hospitalization</option>
	<option value="4">Post Part A Stay Level 2 or Higher</option>
	<option value="5">Other</option>
</select>
If I could pull out each <select> element from my html document, that would be enough. Anything beyond that would be gravy.

Zombywuf
Mar 29, 2008

Parse it with your favourite html parser and use the xpath "//select". If you have particular language or system in mind I may be able to recommend a library.

Rick Rickshaw
Feb 21, 2007

I am not disappointed I lost the PGA Championship. Nope, I am not.

Zombywuf posted:

Parse it with your favourite html parser and use the xpath "//select". If you have particular language or system in mind I may be able to recommend a library.

Worked perfectly. Took me a while to find the right example for what I wanted to do, but it works!

http://pastebin.com/cHJJBGat

Zombywuf
Mar 29, 2008

Rick Rickshaw posted:

Worked perfectly. Took me a while to find the right example for what I wanted to do, but it works!

http://pastebin.com/cHJJBGat

If I'm reading that right you can simplify it by using a more complex xpath. "//select/option/@value" will give the value attribute nodes directly so you don't need to muck about with DOM manipulation.

Factor Mystic
Mar 20, 2006

Baby's First Post-Apocalyptic Fiction
Is there a name of the kind of side by side documentation | code found here? And secondly, how do I generate it myself?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Factor Mystic posted:

Is there a name of the kind of side by side documentation | code found here? And secondly, how do I generate it myself?

It's docco, created for CoffeeScript but ported to (at least) ruby and sh.

Adbot
ADBOT LOVES YOU

gariig
Dec 31, 2004
Beaten into submission by my fiance
Pillbug
My work is currently looking for some sort of question and answer tool for use internally. Right now when the development team gets a requirement and has questions a huge e-mail chain is started with all of the questions. It can quickly get unwieldy trying to keep up with the e-mail thread and god forbid someone replies to the wrong e-mail and it forks. Also, trying to figure out that status of a question is difficult.

What we are looking for is something either hosted by a third party or it has to run on .NET/SQL Server. I think something with threaded discussions where a user can be assigned a question to come and answer. Being able to attach images is also a must and insert of files would be helpful (Excel mostly for database results). Being able to have a status for a question would be pretty nice (open/closed).

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