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
pmchem
Jan 22, 2010


Eeyo posted:

I primarily do physics programming, so large mathematical expressions come up a lot.

Is there any kind of general strategy to minimize computation time for large expressions with many parts? Think something with a several term numerator and denominator, involving powers of some quantities and also some grouping too.

Is it best practice to group everything up into one evaluation? Or should I build up the different parts over several evaluations into partial parts? Can compilers optimize large mathematical expressions at all?

I expect the answer is in general no, but I figured someone else may have thought a lot about this.

In general, you'd be better off focusing on algorithm choice (minimize the X in O(N^X) scaling) and less on numerators. Let compiler worry about that, with appropriate -O2/-O3 flags. You'll find that having human-friendly source code is much more important in the long term than micro-optimizations. Sometimes having human-readable source is compatible with micro-optimizations, such as calculating r**6 for a Lennard-Jones potential, then later, using it once and using its square once (since squares are often faster than arbitrary powers).

Other exceptions are optimizations that are not micro, such as parallelization/vectorization, cache optimization, using pointers (pass by reference) instead of memory copies when possible, etc.

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...
And after you're done with all those fine suggestions perhaps do some profiling to figure out where things are Actually Slow.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

JawnV6 posted:

And after you're done with all those fine suggestions perhaps do some profiling to figure out where things are Actually Slow.

Given that this is physics programming, my assumption was that they're doing an expensive simulation and know very well what is actually slow. ...not that it's not worth profiling it anyway. You might be surprised.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

Eeyo posted:

I primarily do physics programming, so large mathematical expressions come up a lot.

Is there any kind of general strategy to minimize computation time for large expressions with many parts? Think something with a several term numerator and denominator, involving powers of some quantities and also some grouping too.

Is it best practice to group everything up into one evaluation? Or should I build up the different parts over several evaluations into partial parts? Can compilers optimize large mathematical expressions at all?

I expect the answer is in general no, but I figured someone else may have thought a lot about this.

Look up Horner's method

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

TooMuchAbstraction posted:

Given that this is physics programming, my assumption was that they're doing an expensive simulation and know very well what is actually slow. ...not that it's not worth profiling it anyway. You might be surprised.

Yeah given that this is physics programming in fortran I'm guessing it's likely the "one giant number-crunching loop" variety of program.

JawnV6
Jul 4, 2004

So hot ...

HappyHippo posted:

Yeah given that this is physics programming in fortran I'm guessing it's likely the "one giant number-crunching loop" variety of program.
And it's definitely compute limited solvable with source edits. Not horrendously cache-unfriendly memory access patterns, not build options. Got it.

fritz
Jul 26, 2003

JawnV6 posted:

And after you're done with all those fine suggestions perhaps do some profiling to figure out where things are Actually Slow.

This is the only piece of useful advice.

Neat Machine
May 5, 2008

heh
Not really a technical question, but here goes:

I've been shopping around for a new junior .NET role, it will be my second professional programming job and I've got about 1.5 years of experience right now. I got an offer, and it comes with a substantial raise.

I haven't pulled the trigger yet because something feels slightly off to me. I don't know how to explain it other than to say that I didn't walk into their office and feel like, "This is right." I'm not sure if this is because I've become so comfortable at my current job and the thought of change makes me uneasy, or if there are some intangible qualities about the company that are causing it. It's worth mentioning that I did make a visit to two other companies, and one of them did feel "right" but unfortunately I did not get an offer.

My questions, without adding too many more details, are whether or not these feelings are normal and whether or not I should base decisions off of them. Can anyone with more experience switching employers weigh in for me? I'm wondering if I may be aiming too high right now, and if I should focus more on taking the right step than worrying about finding a perfect environment for the long-term.

Neat Machine fucked around with this message at 00:30 on Jul 28, 2016

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Give it some thought. If you come up with something more specific than "it doesn't feel right", then come back and ask about that. But if you can't, then maybe it's worth taking the offer and seeing how it goes.

Gangsta Lean
Dec 3, 2001

Calm, relaxed...what could be more fulfilling?
Yes, it's hard to say without knowing more about your current situation. Even "substantial raise" may be enough on its own to outweigh anything else.

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.

Fancy Corndog posted:

Not really a technical question, but here goes:

I've been shopping around for a new junior .NET role, it will be my second professional programming job and I've got about 1.5 years of experience right now. I got an offer, and it comes with a substantial raise.

I haven't pulled the trigger yet because something feels slightly off to me. I don't know how to explain it other than to say that I didn't walk into their office and feel like, "This is right." I'm not sure if this is because I've become so comfortable at my current job and the thought of change makes me uneasy, or if there are some intangible qualities about the company that are causing it. It's worth mentioning that I did make a visit to two other companies, and one of them did feel "right" but unfortunately I did not get an offer.

My questions, without adding too many more details, are whether or not these feelings are normal and whether or not I should base decisions off of them. Can anyone with more experience switching employers weigh in for me? I'm wondering if I may be aiming too high right now, and if I should focus more on taking the right step than worrying about finding a perfect environment for the long-term.

I feel like any place that hires for .NET has a higher-than-average chance of being a weird hellhole. I like visual studio and TFS and C# and .NET and think they're great tools, but it's really easy to find companies that were dumb enough to be Microsoft shops back when people were writing desktop apps in C++ using MFC and just kept buying whatever microsoft releases, and then you end up working with a bunch of old people who don't know what the internet is. That said, what's the worst that can happen, another 20k raise in a year and a half?

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!

Bruegels Fuckbooks posted:

I feel like any place that hires for .NET has a higher-than-average chance of being a weird hellhole. I like visual studio and TFS and C# and .NET and think they're great tools, but it's really easy to find companies that were dumb enough to be Microsoft shops back when people were writing desktop apps in C++ using MFC and just kept buying whatever microsoft releases, and then you end up working with a bunch of old people who don't know what the internet is. That said, what's the worst that can happen, another 20k raise in a year and a half?

Or you get cases where the business runs on XYZ Legacy system from HP/IBM and the 'easiest' or 'first' way to interface with that was through some Visual C++ or Visual Basic library, and they're still using Visual Studio 6. Scared to try anything new so...

Peristalsis
Apr 5, 2004
Move along.

Fancy Corndog posted:

Not really a technical question, but here goes:

I've been shopping around for a new junior .NET role, it will be my second professional programming job and I've got about 1.5 years of experience right now. I got an offer, and it comes with a substantial raise.

I haven't pulled the trigger yet because something feels slightly off to me. I don't know how to explain it other than to say that I didn't walk into their office and feel like, "This is right." I'm not sure if this is because I've become so comfortable at my current job and the thought of change makes me uneasy, or if there are some intangible qualities about the company that are causing it. It's worth mentioning that I did make a visit to two other companies, and one of them did feel "right" but unfortunately I did not get an offer.

My questions, without adding too many more details, are whether or not these feelings are normal and whether or not I should base decisions off of them. Can anyone with more experience switching employers weigh in for me? I'm wondering if I may be aiming too high right now, and if I should focus more on taking the right step than worrying about finding a perfect environment for the long-term.

That's a really tough situation. My first programming job sucked (podunk outfit, outmoded platform, insane company owner), and I really had some misgivings about the job when I walked out of the interview. Here's the thing: I learned a lot of programming at that job, got some critical experience, and used it to move on in a couple of years. If you'll learn new skills at the new job, and make better money, you can put up with almost anything for a year or two. Getting experience with different ways of doing things (different source control, coding styles, emphases, etc.) is a good thing, especially early in your career, as is learning to deal with different sorts of people in different fields/companies. As long as they don't demand 80 hour work weeks and just completely destroy your soul, you probably can't go too wrong. Also, if you decide to take the job, don't hesitate to use it to try to get a raise out of your current employer first. However, don't play that card unless/until you are ready to accept the new offer - you lose all credibility, leverage, and respect if you threaten to leave unless you get a raise, then don't leave when you don't get it.

Neat Machine
May 5, 2008

heh
Thanks for the responses. I accepted the offer today. It is about a 20% raise and I don't think they're doing any obviously weird poo poo as far as technology choices, but then again I might not notice them. I mean they're at least using C# and not VB or something. Having thought about it some more, I think the feeling I had came from the fact that this company is a bit smaller than my current one. I think the pay bump is definitely worth giving it a shot since all I can come up with is "idk, feels weird." Thanks again for the input.

Eeyo
Aug 29, 2004

Thanks for the helpful responses!

I definitely agree I should actually profile my code at some point. I'm making the assumption that most of the action happens in a few subroutines, but there's a bit of glue as well (summing up a superposition of vector components, and a few coordinate transformations) which I figured took less time but I never checked.

I'll likely just let the compiler have a go at it, since I'm just going to give my advisor the code at the end of the project, and I can currently comfortably run what I want to, so I don't need to optimize to make it solvable.

I'm interested in learning more about this SIMD stuff though, I've seen it on several occasions but I have no knowledge of it.

Inspector 34
Mar 9, 2009

DOES NOT RESPECT THE RUN

BUT THEY WILL
I've got a couple projects in mind and I'm wondering if you all think they're reasonable for a novice like me. The problem is they're pretty different so I don't know if learning the basics of just one language will be enough. Forgive me if my terminology is a little off, I don't 100% know what I'm even talking about, but anyways, here's what I have in mind:

-Access my customer database through our point of sale's API. Will do some very basic statistics and publish the results to a webpage. This will just be stuff like when we're most busy so people can check ideal times to come in and avoid wait times.

-Build an auto-locking pet door for my great dane. I'm sure things like this exist already but they're mostly for smaller animals. I thought it would be a fun, easy project to start with. I was thinking of reading his RFID chip to lock/unlock the door based on his proximity and using a small electromagnet to lock it.

I have some experience with coding, but it's been about 10 years since I've done anything. In college I was pretty good with Maple and Matlab for numerical analysis. I don't know what language those types of things use but it seemed very simple, without a lot of complicated syntax. I also got to play around with PLC's for a semester, but I think we used some kind of graphical application to give them instructions rather than writing out code.

These don't seem like super complicated projects, but I don't really know where to get started. Would something like Code Academy give me the basic skills to pull this kind of stuff off? What languages will I most likely need to use for these projects?

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Inspector 34 posted:

I've got a couple projects in mind and I'm wondering if you all think they're reasonable for a novice like me. The problem is they're pretty different so I don't know if learning the basics of just one language will be enough. Forgive me if my terminology is a little off, I don't 100% know what I'm even talking about, but anyways, here's what I have in mind:

-Access my customer database through our point of sale's API. Will do some very basic statistics and publish the results to a webpage. This will just be stuff like when we're most busy so people can check ideal times to come in and avoid wait times.

-Build an auto-locking pet door for my great dane. I'm sure things like this exist already but they're mostly for smaller animals. I thought it would be a fun, easy project to start with. I was thinking of reading his RFID chip to lock/unlock the door based on his proximity and using a small electromagnet to lock it.

I have some experience with coding, but it's been about 10 years since I've done anything. In college I was pretty good with Maple and Matlab for numerical analysis. I don't know what language those types of things use but it seemed very simple, without a lot of complicated syntax. I also got to play around with PLC's for a semester, but I think we used some kind of graphical application to give them instructions rather than writing out code.

These don't seem like super complicated projects, but I don't really know where to get started. Would something like Code Academy give me the basic skills to pull this kind of stuff off? What languages will I most likely need to use for these projects?

The first one, you could write it in almost any language, but you probably want to use a modern high-level language so it will be easy to do the internet related stuff. You could pull this off in most popular or semi-popular programming languages, but some will make it easier than others due to the standard library or public ecosystem of libraries providing rich functionality. I would make it this program create static web pages. That way you can be sure you aren't making a big security hole of a webapp.

The second project would traditionally be done with a microcontroller and C. The microcontroller is a small embedded computer, but they don't have very much memory so you are limited in what you can use to write your program. C is low level and doesn't provide many tools standard, and the language is missing a lot of newer syntax 'sugar' that makes it faster and easier to write code. However, these days you can get a single-board computer like a raspberry pi for the same price as a microcontroller demo board. It is powerful enough to run linux and you can use almost any language you want. You might as well use the same language you want to use for the first project.

Python would be a pretty good choice to do both. Or a ton of other languages

Code academy is probably fine to get going, you will probably have to do some digging and question asking for the hardware parts of the door project (and everything else in programming - google often). Check out the electronics thread and ask questions about how to operate the door.

Inspector 34
Mar 9, 2009

DOES NOT RESPECT THE RUN

BUT THEY WILL
Thanks that's really helpful! For the webapp project I'll definitely take your suggestion and do a static page. I really don't need our customer info to be out there for the taking. We don't keep any financial info or anything, but giving away email and phone #'s would be bad enough.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
Keep in mind for the first one that it can be detrimental to have a webpage saying "Hey, we're super-busy right now, you shouldn't stop by our store". You want to encourage people to visit, not discourage them.

I bet you can come up with a design that would do that, but it'll have to be more complicated (at least in presentation) than just telling the user "we're usually slammed at 3PM".

Inspector 34
Mar 9, 2009

DOES NOT RESPECT THE RUN

BUT THEY WILL
We're a go kart track, by the way. I'm envisioning this thing as a way for people to get the types of race they actually want. So you could see that it's really busy both Monday night and Saturday evening, but laptimes are poo poo on Saturday because it's a bunch of novices, while on Monday laptimes are amazing so you can get on track with good drivers. Conversely, if you want wide open track you can see that weekday afternoons are dead slow.

You're right though that I should be careful to lay it out to actually achieve what I'm imagining rather than just destroy our Saturday night business. Ideally I'd like to give people a way to make reservations online instead of over the phone, but I think that will be beyond me for a while.

it is
Aug 19, 2011

by Smythe
I wanna write something to scrape manta.com (a directory of local businesses) for work. I started but my rough draft got sniffed out by their security. The site is clearly designed to be crawled, but what are some best practices to make sure I can get the information I'm looking for without getting in trouble?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

it is posted:

I wanna write something to scrape manta.com (a directory of local businesses) for work. I started but my rough draft got sniffed out by their security. The site is clearly designed to be crawled, but what are some best practices to make sure I can get the information I'm looking for without getting in trouble?

It depends? Easiest thing to do is ask for their data (they won't give it to you).

Failing that, you can write your crawler to distribute scraping tasks to multiple machines and make sure any given machine doesn't make calls extremely quickly or at precise intervals. Eg, use a bot net.

I don't know what "getting into trouble" means to you. If you don't want to get your bot shut down, try to mimic human actions. If you are worried from a legal/ethical standpoint, maybe don't do a thing.

Basically don't piss off their CJ's and even if they catch you they may not care enough to bother dealing with you. But if you interfere with the operation of their site by DOSing them, they'll very likely blacklist you.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
At the very least you should throttle your request rate so you aren't spamming their servers with requests as fast as possible. That looks like a DDOS attack and it wouldn't surprise me if competent admins would set up some automatic (ideally temporary) blocking for users that request pages too quickly.

Obviously this slows down your scraping, but if you need to scrape their site as fast as possible then you should probably consider if your project is a good idea.

it is
Aug 19, 2011

by Smythe
Nice, I'll slow down the request rate and figure out how to distribute my requests. Thanks :D

JawnV6
Jul 4, 2004

So hot ...

it is posted:

The site is clearly designed to be crawled
I'm curious what this means besides "programmatically generated"

Jewel
May 2, 2009

I'm also interested in what you meant by "got sniffed out". Did you just get rate limited/blocked from accessing for a while, or? I've heard one request every, I think it was 3 seconds, is a good number to not get messed with, but yeah there's a lot of guidelines out there. Not many people want you scraping their servers, since it's a lot more load for no benefit on their end.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
If you're really wanting to scrape their whole site, have you considered calling them up and just offering to pay them money for the data you're interested in?

Thermopyle
Jul 1, 2003

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

What kind of methods, if any, are good for determining if an image has been resized above it's original resolution?

I'm thinking there's probably some fancy algorithm someone came up with...

Linear Zoetrope
Nov 28, 2011

A hero must cook

Thermopyle posted:

What kind of methods, if any, are good for determining if an image has been resized above it's original resolution?

I'm thinking there's probably some fancy algorithm someone came up with...

Any technique would have to be approximate, you wouldn't be able to tell if you resized an image that's all black, for instance. You may have decent luck combining heuristics such as counting how many pixels are repeated near each other, assuming you're only focusing on really specific domains like real photographs (where colors that are EXACTLY the same are rarer) but that depends on the resampling the program did while upscaling. You could probably use a really simple out-of-the-box deep network (like an adapted VGG-net or Cifar 10 with only 2 outputs for resized/not-resized) for this, but you'd need a separate network for common image resolutions since their input size is generally fixed (and you obviously can't resize to the input size if you're trying to detect resizes :v:, though you may be able to pad the image with black pixels or something).

Linear Zoetrope fucked around with this message at 20:59 on Aug 3, 2016

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Thermopyle posted:

What kind of methods, if any, are good for determining if an image has been resized above it's original resolution?

I'm thinking there's probably some fancy algorithm someone came up with...

I have no idea about specifics, but I'd be inclined to try to quantify the informational content of the image and use some heuristics to compare that to what I would expect for an image of its dimensions. Broadly speaking this would involve trying to compress the image and seeing how much you can decrease its size.

Another possible approach would be to try to characterize how different resizing techniques change the input image. For example, you could recognize a point-resized image because it will consist of many "blocks" of identical size, while a "smoothed" resized image will have uniformly fuzzy edges.

Ultimately, I don't think you're going to be able to come up with a single solution that will work for all images and resizing techniques, simply due to the very wide range of possible inputs. Consider a well-aligned photograph of a Mondrian painting, for example, or a screenshot of an indie pixel-art game.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
This is not being nice, really, but there are a few things:

- read their robots.txt
- handle cookies
- fake user agent header
- fake referral header
- other odd header tokens
- randomize the order of page crawls

These are problems I've encountered before, when I was trying to do fancy natural language stuff by scraping web forums.

Also almost forgot:
- hidden form submit values

dougdrums fucked around with this message at 21:08 on Aug 3, 2016

fritz
Jul 26, 2003

Thermopyle posted:

What kind of methods, if any, are good for determining if an image has been resized above it's original resolution?

I'm thinking there's probably some fancy algorithm someone came up with...

First thing that comes to mind is looking at the fourier spectrum and in particular the proportion of energy in the higher-frequency components, and then compare that to what happens when you resize a variety of images using a variety of algorithms.

JawnV6
Jul 4, 2004

So hot ...

Thermopyle posted:

What kind of methods, if any, are good for determining if an image has been resized above it's original resolution?

I'm thinking there's probably some fancy algorithm someone came up with...

Downsize it, resize it, check against the original. Repeat for other scaling algorithms.

Marshmallow Blue
Apr 25, 2010
Hey everyone

I have a dinosaur question. By that I mean actionscript3, and it looks like the mega-thread is gone. I'm just trying to pick this up and have hit a bump.


I made a stupid timer that counts down from 20 seconds. Then when complete resets to 20. But: When I click the button to make the timer count down again (from 20), it instead adds 20, and subtracts 1.

code:
var nCount:Number=20;
var myTimer:Timer=new Timer (1000, nCount); 
timer_txt.text=nCount.toString();

myTimer.addEventListener(TimerEvent.TIMER, countDown); 

function countDown (e:TimerEvent):void {
	nCount--;
	timer_txt.text = nCount.toString();
}

function countUp (e:TimerEvent):void{
	trace("Beer finished");
	nCount +=20;
	timer_txt.text = nCount.toString();
}


brewstand.addEventListener(MouseEvent.CLICK, beginBrewing);

function beginBrewing(event:MouseEvent):void
{
	myTimer.start();
	trace("You're Making Beer!");
	myTimer.addEventListener(TimerEvent.TIMER_COMPLETE, countUp);
}

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

Marshmallow Blue posted:

Hey everyone

I have a dinosaur question. By that I mean actionscript3, and it looks like the mega-thread is gone. I'm just trying to pick this up and have hit a bump.


I made a stupid timer that counts down from 20 seconds. Then when complete resets to 20. But: When I click the button to make the timer count down again (from 20), it instead adds 20, and subtracts 1.

code:
var nCount:Number=20;
var myTimer:Timer=new Timer (1000, nCount); 
timer_txt.text=nCount.toString();

myTimer.addEventListener(TimerEvent.TIMER, countDown); 

function countDown (e:TimerEvent):void {
	nCount--;
	timer_txt.text = nCount.toString();
}

function countUp (e:TimerEvent):void{
	trace("Beer finished");
	nCount +=20;
	timer_txt.text = nCount.toString();
}


brewstand.addEventListener(MouseEvent.CLICK, beginBrewing);

function beginBrewing(event:MouseEvent):void
{
	myTimer.start();
	trace("You're Making Beer!");
	myTimer.addEventListener(TimerEvent.TIMER_COMPLETE, countUp);
}

Never did ActionScript, but it looks close enough to JS. Not sure how Timer works, or what TIMER_COMPLETE vs TIMER means, but you can probably refactor a little to make it simpler to follow. Instead of separate countUp and countDown methods, have a single count method, which does bounds checking internally, then when called on nCount === 0, declares Beer Finished, stops the timer, and resets nCount to 20.

Alternatively, you can just change nCount +=20 to nCount=20.

Skandranon fucked around with this message at 15:53 on Aug 4, 2016

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Marshmallow Blue posted:

Hey everyone

I have a dinosaur question. By that I mean actionscript3, and it looks like the mega-thread is gone. I'm just trying to pick this up and have hit a bump.


I made a stupid timer that counts down from 20 seconds. Then when complete resets to 20. But: When I click the button to make the timer count down again (from 20), it instead adds 20, and subtracts 1.

code:
var nCount:Number=20;
var myTimer:Timer=new Timer (1000, nCount); 
timer_txt.text=nCount.toString();

myTimer.addEventListener(TimerEvent.TIMER, countDown); 

function countDown (e:TimerEvent):void {
	nCount--;
	timer_txt.text = nCount.toString();
}

function countUp (e:TimerEvent):void{
	trace("Beer finished");
	nCount +=20;
	timer_txt.text = nCount.toString();
}


brewstand.addEventListener(MouseEvent.CLICK, beginBrewing);

function beginBrewing(event:MouseEvent):void
{
	myTimer.start();
	trace("You're Making Beer!");
	myTimer.addEventListener(TimerEvent.TIMER_COMPLETE, countUp);
}

My guess is that you need to call Timer.reset before Timer.start. The documentation doesn't say anything about it, but start probably don't imply reset. My guess is that when it stops it gets into some undefined state that results it in ignoring the first delay when you restart.

Marshmallow Blue
Apr 25, 2010

dupersaurus posted:

My guess is that you need to call Timer.reset before Timer.start. The documentation doesn't say anything about it, but start probably don't imply reset. My guess is that when it stops it gets into some undefined state that results it in ignoring the first delay when you restart.

This worked, and signifies my first successful bit of code ever written! Thank you.

I had to change the countUp function to -

code:
myTimer.reset();
	nCount +=21;
(the 21 because it count's the remaining 0 as a second then goes to 19. I know it's technically 21 seconds, but I'd like the end user to see 20 seconds on the clock).

Edit: NVM has to be 20 because it stops at 1 lol

Marshmallow Blue fucked around with this message at 16:37 on Aug 4, 2016

Mathematicus
Mar 10, 2004
Gozintas a specialty
This is a shot in the dark, but I'm looking for advice on creating a LIMS system.

Has anyone modified and used a free, open source LIMS system? If so, any thoughts on the one you used, or ones you wish you had used?
Has anyone ever written a LIMS system from scratch? Any thoughts on what platforms are best or worst for doing so?

My boss won't come out and say it, but he has determined that we must write a new LIMS from scratch, and that, logically, it can only be in Python/Django. I'm not necessarily opposed to that in principle, but I don't know Python/Django, and if I have to learn a new platform anyway, we might as well pick one that's best for the task. I feel like we should at least consider something known more for performance than Django or Rails, in case we end up wanting to support lots of users or large data sets or whatever, but I don't know anything about LIMSes or the relative merits of web frameworks, so I thought I'd ask here before I spout off about it in a meeting.

I'd also like to consider freely available open source LIMS, at least to use as a starting point. Having the schema defined and some basic structure in place could save us a lot of time.

Mathematicus fucked around with this message at 17:06 on Aug 4, 2016

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Mathematicus posted:

This is a shot in the dark, but I'm looking for advice on creating a LIMS system.

Has anyone modified and used a free, open source LIMS system? If so, any thoughts on the one you used, or ones you wish you had used?
Has anyone ever written a LIMS system from scratch? Any thoughts on what platforms are best or worst for doing so?

My boss won't come out and say it, but he has determined that we must write a new LIMS from scratch, and that, logically, it can only be in Python/Django. I'm not necessarily opposed to that in principle, but I don't know Python/Django, and if I have to learn a new platform anyway, we might as well pick one that's best for the task. I feel like we should at least consider something known more for performance than Django or Rails, in case we end up wanting to support lots of users or large data sets or whatever, but I don't know anything about LIMSes or the relative merits of web frameworks, so I thought I'd ask here before I spout off about it in a meeting.

I'd also like to consider freely available open source LIMS, at least to use as a starting point. Having the schema defined and some basic structure in place could save us a lot of time.

What does LIMS stand for?

Adbot
ADBOT LOVES YOU

Peristalsis
Apr 5, 2004
Move along.

leper khan posted:

What does LIMS stand for?

Laboratory Information Management System
https://en.wikipedia.org/wiki/Laboratory_information_management_system

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