Someone is agitating for time zone support on our box. Noooooooooooooooooooooooooooooooo
Timezone stuff is the worst. Implementing it across the board and correctly was such a pain. Store everything as UTC in database and then apply timezone conversions on any datetime going out or coming in with a user preference setting what timezone they want to display things in/ convert inputs from.
Stuff like last week, last month, last year filtering you have to make your DB sprocs take Start and End Date parameters and convert in code so that those values are correct for the specific user's timezone.
was given the all clear by the business to not use .NET systems for future minor web work because deploying .NET onto company infrastructure is a red tape nightmare. the cornucopia of the web is open to me. i'm cold and frightened.
Unit tests are a project apart, not a #define option that you turn on in the main project.
Interesting concept. We keep all of our tests in the main project, but most be in standalone implementation files. We than use build control flags to decide if we want to enable the tests. Personally the upside for this is that it becomes easier to keep the source and tests synchronized even with a heavy topic branch based workflow.
I will do that sometimes, but only with C interfaces and I don't want to expose the internals directly, but need to use them in the tests
It might be because I have only ever worked one way, but placing my tests in a separate repository than the code boggles my mind. The software process around validating that branches use the correct test repository branch must be annoying.
Oh, if this is reference my original post, then I was using the term "project" in the Visual Studio sense.
So we have the whole solution, and I tend to put the unit tests as their own "project" (i.e. they have their own executable which verifies individual components/logical groups of components)
They're still in the same repo, just in a separate subdirectory.
Unfortunately, there are at least two levels of WTFness that I was too busy frothing at my mouth about to type in that post:
1.) The unit test define macro were part of the main app and enabled by default in a .h file (as opposed to, say, a command line option), so by checking out the source tree and building, you'd get a build of the main app that tried to run unit tests.
2.) They weren't actually unit tests. No actual verification was being done at all, other than maybe "well, it doesn't crash when I run it".
Someone is agitating for time zone support on our box. Noooooooooooooooooooooooooooooooo
Timezone stuff is the worst. Implementing it across the board and correctly was such a pain. Store everything as UTC in database and then apply timezone conversions on any datetime going out or coming in with a user preference setting what timezone they want to display things in/ convert inputs from.
Stuff like last week, last month, last year filtering you have to make your DB sprocs take Start and End Date parameters and convert in code so that those values are correct for the specific user's timezone.
Yeah. I think my manager told him to fuck off, but I'm not looking forward to it coming up again. Especially considering what we do, having all the boxes be on UTC makes our lives a lot easier.
Does anyone have experience installing packages for python? I have been spending the last hour trying to install things like numpy, scipy, h5py, and what not. I have not been successful. Its quite disheartening really. It makes me appreciate how awesome NuGet is.
I have tried Anaconda, WinPython, installing by downloading the source. I just can't get it to work. Any advice would be amazing.
0
Options
mightyjongyoSour CrrmEast Bay, CaliforniaRegistered Userregular
On Linux at least, you can use pip to grab and install packages... might be able to use on Windows too? (I have no clue, I don't use windows for dev)
It's been a few months since I installed Python packages on Windows, but I don't remember it being that difficult. I'm pretty sure there was some pip-thing involved
I installed anaconda, tried import numpy and I am told numpy cannot be found. Do I have to muck with PATH stuff? For how easy some things are in python thus far I find dealing with dependencies to be a bit frustrating. I have been reading that people recommend using virtualenv to make different environments to work in. I don't quite understand the logic behind it all. This is the first time I will be working with python in any meaningful way. I have used ironpython to add scripting to my .NET applications however I have never tried writing a python application. My initial thought was a module was like a project reference however that notion appears to be completely wrong.
From what I have read of virtualenv it seems the idea is to create a new python environment for each project. Then with an IDE like PyCharm you can swap between environments and keep them clean. After a bit more messing around I found http://www.lfd.uci.edu/~gohlke/pythonlibs/ and after installing one of those pre-build numpy modules I could import it however I think I would have prefered to have it installed in the virtual environment I created. Does anyone have any experience working with virtualenv or have a link to a good tutorial on setting up a python development environment? I have found the simple (think python101) tutorials however finding a good one that explains environments, modules, and what not been easy. It's not the programming part that is difficult.
pip should also work on windows. I think you will have to fuck around with paths. You'll also occasionally run into a lib that truly does not work on windows (I think they're fairly rare). I'm not sure how well libs which need to compile C or C++ code are going to work out, those may be a real nightmare to get working.
Virtualenv is the way to go with Python. I have no experience getting it working on Windows, though. I installed Python on Windows once or twice, but have done nothing with it. Basically anything you read about Python and any tools you use will more or less assume you're on on Linux or osx. Looking at the virtualenv docs, it looks like you'll just install on windows with pip as you normally would, then read the bits about windows under http://virtualenv.readthedocs.org/en/latest/virtualenv.html#activate-script. Once you activate a virtualenv, you just use pip to install packages as usual.
Virtualenv is pretty much required if you're doing serious python work. Each of your project's dependencies will need to be installed, and if you aren't using virtualenvs they're installed into the system python. Then, if two different projects require different versions of the same package, you're in trouble. Much better to install your dependencies in virtualenvs specific to that project.
Pip is definitely the best and easiest way to do it on Linux, I have no idea on Windows. I worked in Linux, and only briefly touched python in Windows, so I can't really help with that specifically. What I do know, though, is that numpy and scipy were harder to install than regular packages. I don't remember the specific problems I had, but it took extra time and effort to get them going. It might be worth trying to get virtualenv and pip working with a simpler package before dealing with them. Unless they've changed in the last year.
0
Options
KakodaimonosCode fondlerHelping the 1% get richerRegistered Userregular
I don't know if this would work for you, but Enthought Canopy has all the scipy and jumpy/ATLAS stuff rolled up.
I am pretty sure pip tries to compile packages that have C/C++ dependencies on windows. Which is going to be the real problem as numpy, scioy, hdf5, etc have a fairly complex dependency set that generally needs some tweaking to perform ( blas, lapack, mpi, etc )
I am pretty sure pip tries to compile packages that have C/C++ dependencies on windows. Which is going to be the real problem as numpy, scioy, hdf5, etc have a fairly complex dependency set that generally needs some tweaking to perform ( blas, lapack, mpi, etc )
pip is supposed to be able to use precompiled eggs or whls if pypi has them (numpy has some whls, but only for OS X). I'm not sure if pip needs the wheel package to understand them, hopefully not.
(the name wheels come cheese wheels, because pypi is also known as the cheese shop, because monty python. You can also think of it as a snake eating its own tail.)
End on
I wish that someway, somehow, that I could save every one of us
Slightly non-programming related. I'm going to be getting a esophagogastroduodenoscopy on Monday. I didn't realize that was a word until it happened.
I say it's slightly non-programming related because technically I got whatever I got while at this job while programming..
That's stretching isn't it? Also it's relieving to see someone else complain about their job in this thread.
Hey, I complain sometimes. I've just been trying to keep it in check lately because I feel like I complain about too much stuff too often and there really are a lot of good parts of this job as well. I also work on some cool stuff and may actually want to mention names/show off on occasion and I don't want to have that come up in a web search and be tracked back to me complaining about my job every other page.
Re: Gender, hey you never know!
Re: Rest, Yeah I worried about that but at this point it's probably too late for me. I have no venting place anymore (I stopped doing it on Facebook) so otherwise I would go home and drink myself stupid if I didn't have this thread.
There's always the job thread in SE++ for general complaining/discussion.
Welp, at least one day out of this week I actually got something done.
Is it bad that I'm looking forward to my procedure on Monday so I have a day off?
0
Options
mightyjongyoSour CrrmEast Bay, CaliforniaRegistered Userregular
Today is going to be a good day, I'm doing a upgrade of the OS and software on the prototype machine which means:
a ) no one is going to fucking bother me for the whole day
b ) I get to listen to music all day because of (a)
c ) people will bother me less to do shit for them because it brings the software to standard deployment so people will know what to do with it
+1
Options
Mr_Rose83 Blue Ridge Protects the HolyRegistered Userregular
Today is going to be a good day, I'm doing a upgrade of the OS and software on the prototype machine which means:
a ) no one is going to fucking bother me for the whole day
b ) I get to listen to music all day because of (a)
c ) people will bother me less to do shit for them because it brings the software to standard deployment so people will know what to do with it
Nope, should have known, people always find a way. In this case there's someone who has no idea how to install the software, who is for some reason installing software, and who is for some reason coming to me for all his problems. /tableflip
Today is going to be a good day, I'm doing a upgrade of the OS and software on the prototype machine which means:
a ) no one is going to fucking bother me for the whole day
b ) I get to listen to music all day because of (a)
c ) people will bother me less to do shit for them because it brings the software to standard deployment so people will know what to do with it
Nope, should have known, people always find a way. In this case there's someone who has no idea how to install the software, who is for some reason installing software, and who is for some reason coming to me for all his problems. /tableflip
I don't necessarily endorse as radical of a view as his. But static overloading has clear issues in the presence of fancy language features, e.g., implicit conversions in Scala or C++.
Kambing on
@TwitchTV, @Youtube: master-level zerg ladder/customs, commentary, and random miscellany.
"This is dangerous because... my really niche examples break it!"
Yes it saves me from having to invent names. Deal with it motherfucker. Nothing is worse than a project full of "DoThing1(),DoThing2()" not even dealing with a few gotchas with overloading.
And random hate on constructors is always fun.
bowen on
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
I find operator/function overloading in C++ is quite handy when you're doing template meta-programming.
In a few other cases, it's also pretty neat and just makes life easier, e.g.
auto varValue = m_DataVector[3];
using std::to_string;
std::string message = to_string( varValue ); // Don't need to really care what varValue was
It might have been std::to_string, or decltype( varValue ) might have been a custom type, so we might be using ecco::to_string( tCustom ) instead.
Who knows?
But then, I tend to use Visual Studio, so Intellisense (or the debugger) will usually be able to tell me exactly which overload I'm calling.
I guess it says something that external tools are used to make use of a language feature, but then, I'm okay with that. We've been using external tools in C/C++ land for ages (lint, valgrind, etc) to catch bugs - why not use external tools (Resharper, Intellisense etc) to help write code?
Posts
Timezone stuff is the worst. Implementing it across the board and correctly was such a pain. Store everything as UTC in database and then apply timezone conversions on any datetime going out or coming in with a user preference setting what timezone they want to display things in/ convert inputs from.
Stuff like last week, last month, last year filtering you have to make your DB sprocs take Start and End Date parameters and convert in code so that those values are correct for the specific user's timezone.
Nintendo ID: Incindium
PSN: IncindiumX
I think you mean CGI::Application.
Oh, if this is reference my original post, then I was using the term "project" in the Visual Studio sense.
So we have the whole solution, and I tend to put the unit tests as their own "project" (i.e. they have their own executable which verifies individual components/logical groups of components)
They're still in the same repo, just in a separate subdirectory.
Unfortunately, there are at least two levels of WTFness that I was too busy frothing at my mouth about to type in that post:
1.) The unit test define macro were part of the main app and enabled by default in a .h file (as opposed to, say, a command line option), so by checking out the source tree and building, you'd get a build of the main app that tried to run unit tests.
2.) They weren't actually unit tests. No actual verification was being done at all, other than maybe "well, it doesn't crash when I run it".
Yeah. I think my manager told him to fuck off, but I'm not looking forward to it coming up again. Especially considering what we do, having all the boxes be on UTC makes our lives a lot easier.
I have tried Anaconda, WinPython, installing by downloading the source. I just can't get it to work. Any advice would be amazing.
Other than Anaconda you could try pythonxy
From what I have read of virtualenv it seems the idea is to create a new python environment for each project. Then with an IDE like PyCharm you can swap between environments and keep them clean. After a bit more messing around I found http://www.lfd.uci.edu/~gohlke/pythonlibs/ and after installing one of those pre-build numpy modules I could import it however I think I would have prefered to have it installed in the virtual environment I created. Does anyone have any experience working with virtualenv or have a link to a good tutorial on setting up a python development environment? I have found the simple (think python101) tutorials however finding a good one that explains environments, modules, and what not been easy. It's not the programming part that is difficult.
Virtualenv is the way to go with Python. I have no experience getting it working on Windows, though. I installed Python on Windows once or twice, but have done nothing with it. Basically anything you read about Python and any tools you use will more or less assume you're on on Linux or osx. Looking at the virtualenv docs, it looks like you'll just install on windows with pip as you normally would, then read the bits about windows under http://virtualenv.readthedocs.org/en/latest/virtualenv.html#activate-script. Once you activate a virtualenv, you just use pip to install packages as usual.
I've heard people swear by conda, but I've never used it
Pip is definitely the best and easiest way to do it on Linux, I have no idea on Windows. I worked in Linux, and only briefly touched python in Windows, so I can't really help with that specifically. What I do know, though, is that numpy and scipy were harder to install than regular packages. I don't remember the specific problems I had, but it took extra time and effort to get them going. It might be worth trying to get virtualenv and pip working with a simpler package before dealing with them. Unless they've changed in the last year.
https://store.enthought.com/
pip is supposed to be able to use precompiled eggs or whls if pypi has them (numpy has some whls, but only for OS X). I'm not sure if pip needs the wheel package to understand them, hopefully not.
(the name wheels come cheese wheels, because pypi is also known as the cheese shop, because monty python. You can also think of it as a snake eating its own tail.)
Just make sure you use the anaconda prompt.
It's the chat/joke threads that are a bear.
Is it bad that I'm looking forward to my procedure on Monday so I have a day off?
a ) no one is going to fucking bother me for the whole day
b ) I get to listen to music all day because of (a)
c ) people will bother me less to do shit for them because it brings the software to standard deployment so people will know what to do with it
Yes?
No, wait, I mean
Yes!
Nintendo Network ID: AzraelRose
DropBox invite link - get 500MB extra free.
It was a trick question! The answer is fizzbuzz!
This is the most infuriating thing about some languages.
I understand you want to protect me from shooting myself in the foot. But a good person practices good gun discipline to begin with.
If I shoot myself in the foot, honest, I won't hold you responsible.
I now have to do the "if(object is Number)" in the method. I feel like that's more annoying than having two separate methods.
I'm just angry lately, ignore my manic episodes.
Sick of having to add features because people don't want to hit two buttons to verify something.
Nope, should have known, people always find a way. In this case there's someone who has no idea how to install the software, who is for some reason installing software, and who is for some reason coming to me for all his problems. /tableflip
Holy shit that's annoying.
It's a semi-contentious language design decision, e.g., see this blog post from Gilad Bracha:
http://gbracha.blogspot.com/2009/09/systemic-overload.html
I don't necessarily endorse as radical of a view as his. But static overloading has clear issues in the presence of fancy language features, e.g., implicit conversions in Scala or C++.
"This is dangerous because... my really niche examples break it!"
Yes it saves me from having to invent names. Deal with it motherfucker. Nothing is worse than a project full of "DoThing1(),DoThing2()" not even dealing with a few gotchas with overloading.
And random hate on constructors is always fun.
In a few other cases, it's also pretty neat and just makes life easier, e.g.
It might have been std::to_string, or decltype( varValue ) might have been a custom type, so we might be using ecco::to_string( tCustom ) instead.
Who knows?
But then, I tend to use Visual Studio, so Intellisense (or the debugger) will usually be able to tell me exactly which overload I'm calling.
I guess it says something that external tools are used to make use of a language feature, but then, I'm okay with that. We've been using external tools in C/C++ land for ages (lint, valgrind, etc) to catch bugs - why not use external tools (Resharper, Intellisense etc) to help write code?