Yay! Not only do I have the Beta done, but I can do a one-click deployment. All I have to do is select either Debug, Demo, or Release in my Solution Configuration in Visual Studio and build the solution. Based on what I selected it will change all the build variables and build the version I want. The Demo version is pretty snazzy because it automatically sets #defines so that you can't save in the Demo release, changes the "about" window, and the WiX installer will only add the demo mission files.
I'm sure this is how it's supposed to work and I'm all excited over nothing. Still neato-burrito to me.
If anyone wants a copy of the demo beta... I have it available.
Hey @Aioua or other powershell nerds, what's the equivalent to xargs in PS? I want to do "foo | xargs bar" but in PS.
edit: should have LMFGTFY'd.
foo | %{&bar $_}
...which looks kind of hideous.
Well that's kind of a hacky way so it looks like xargs. I've never been a fan of the % alias because it explains nothing. (funnily enough, I didn't know what xargs did so the original code was no more enlightening)
and the ampersand isn't necessarily necessary, depends on what your bar command is.
And least there there's only one mysterious symbol so you can guess that it's the current thing in the loop. Or if foo was more complicated I'd probably:
life's a game that you're bound to lose / like using a hammer to pound in screws
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
Yeah, I tossed that into a function in my profile. It's for linting Go files, but golint defaults to including the vendor dir, which is butts, and I don't want butts.
"go list" lists packages and excludes vendor dir, so I thought I'd pipe that to golint instead:
function Go-Lint {
go list ./... | ForEach-Object {golint $_}
}
Hit a little problem though. When I run "go list" directly, it gives me paths to project packages relative to my GOPATH:
λ go list ./...
echocorp/go/warren
echocorp/go/warren/example
echocorp/go/warren/mocks
echocorp/go/warren/prometheus
echocorp/go/warren/stubs
And running golint straight in that repo:
λ golint ./...
sender.go:14:6: exported type Sender should have comment or be unexported
But running the PS'd command gives me full paths:
λ go list ./... | ForEach-Object {golint $_}
C:\Dev\Projects\Go\src\echocorp\go\warren\sender.go:14:6: exported type Sender should have comment or be unexported
Small thing, but a bit annoying. Not sure what PS thinks the CWD is when running the command.
I was missing powershell just yesterday as I was working with python!
Aioua on
life's a game that you're bound to lose / like using a hammer to pound in screws
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
Yeah, I tossed that into a function in my profile. It's for linting Go files, but golint defaults to including the vendor dir, which is butts, and I don't want butts.
"go list" lists packages and excludes vendor dir, so I thought I'd pipe that to golint instead:
function Go-Lint {
go list ./... | ForEach-Object {golint $_}
}
Hit a little problem though. When I run "go list" directly, it gives me paths to project packages relative to my GOPATH:
λ go list ./...
echocorp/go/warren
echocorp/go/warren/example
echocorp/go/warren/mocks
echocorp/go/warren/prometheus
echocorp/go/warren/stubs
And running golint straight in that repo:
λ golint ./...
sender.go:14:6: exported type Sender should have comment or be unexported
But running the PS'd command gives me full paths:
λ go list ./... | ForEach-Object {golint $_}
C:\Dev\Projects\Go\src\echocorp\go\warren\sender.go:14:6: exported type Sender should have comment or be unexported
Small thing, but a bit annoying. Not sure what PS thinks the CWD is when running the command.
Hmm. I don't know anything about go so I can't help you there. CWD is easy enough to temporarily change in powershell if it comes to it?
Aioua on
life's a game that you're bound to lose / like using a hammer to pound in screws
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
I was missing powershell just yesterday as I was working with python!
This collection of words makes no sense!
programmers just don't understand
life's a game that you're bound to lose / like using a hammer to pound in screws
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
Is there a good regex tutorial for beginners? My wife is picking it up, and I'm honestly not sure I can evaluate a tutorial from the perspective of a beginner.
Is there a good regex tutorial for beginners? My wife is picking it up, and I'm honestly not sure I can evaluate a tutorial from the perspective of a beginner.
Are there any java logging libraries that aren't crap? Our initial log4j setup was implemented all weird plus log4j doesn't ( or maybe didn't) handle parameterized strings so our code had to be littered with:
if(logger.isDebug()){
logger.debug("msg" + msg)
}
We moved to slf4j running on top of logback and now we're running into the issue where every instance of a logger context opens a file handle to every single log file defined in the xml, which completely fucks up rolling logs. You can't share appenders across loggers, and you have to assign each appender to a specific logger, so why the hell is it blindly opening file handles. It seems like the answer to this problem is to have unique logback.xml for every process I launch which I find really dumb.
Are there any java logging libraries that aren't crap? Our initial log4j setup was implemented all weird plus log4j doesn't ( or maybe didn't) handle parameterized strings so our code had to be littered with:
if(logger.isDebug()){
logger.debug("msg" + msg)
}
We moved to slf4j running on top of logback and now we're running into the issue where every instance of a logger context opens a file handle to every single log file defined in the xml, which completely fucks up rolling logs. You can't share appenders across loggers, and you have to assign each appender to a specific logger, so why the hell is it blindly opening file handles. It seems like the answer to this problem is to have unique logback.xml for every process I launch which I find really dumb.
Java :rotate:
Wouldn't some package-protected helper methods basically make all those problems go away? Arguably you shouldn't have to build those on top of a logger library, but... I look at that code snippet you posted, and that could have just been stuck in a helper method and then replaced with a single call to that helper method.
0
Options
LuvTheMonkeyHigh Sierra SerenadeRegistered Userregular
I can't speak to using this version of it, but there's a Java rewrite of Serilog, which is far and away (IMO) the best .Net logging framework.
Is there a good regex tutorial for beginners? My wife is picking it up, and I'm honestly not sure I can evaluate a tutorial from the perspective of a beginner.
Oh god I have all the devops to do. I'm suddenly neck deep in "make microservices not suck land" but best I can tell no one's really tackled that in an off-the-shelf way.
Getting good stuff from Prometheus alerts already. A service hit the RAM cap and asploded. Now we get Docker container metrics for individual services with cAdvisor, way better than what we had before.
Getting good stuff from Prometheus alerts already. A service hit the RAM cap and asploded. Now we get Docker container metrics for individual services with cAdvisor, way better than what we had before.
That was... abrupt. What the hell happened to that service?
No idea, we'll investigate when it's not-weekend. Checked the logs real quick so at least we have something more to go on.
That's one of the services that usually doesn't need a whole lot of memory but certain outliers in the jobs it gets can lead to some intensive stuff. Might be we just bump the RAM limit on it.
Oh god I have all the devops to do. I'm suddenly neck deep in "make microservices not suck land" but best I can tell no one's really tackled that in an off-the-shelf way.
Need any pointers? This is pretty much my job.
At the moment I think I'm just engaged in the usual game of "yes, I need full admin access to pretty much everything that's what you hired me for".
I'm also currently threading the needle with the developers of "I will tell you how to work" while stressing that I am also on their side.
0
Options
OrcaAlso known as EspressosaurusWrexRegistered Userregular
So, LinkedIn. Should I be keeping it updated or can/should I ignore it? And what on there is important vs. what is just them fishing for more information?
So, LinkedIn. Should I be keeping it updated or can/should I ignore it? And what on there is important vs. what is just them fishing for more information?
Most people only REALLY update it if they're looking. Keeping it semi-current with at least your position isn't a bad idea, but if you spend a lot of time on it that's generally seen as the "job hunting" batsignal.
0
Options
OrcaAlso known as EspressosaurusWrexRegistered Userregular
So, LinkedIn. Should I be keeping it updated or can/should I ignore it? And what on there is important vs. what is just them fishing for more information?
Most people only REALLY update it if they're looking. Keeping it semi-current with at least your position isn't a bad idea, but if you spend a lot of time on it that's generally seen as the "job hunting" batsignal.
Hah. I deliberately didn't update it while job-hunting to avoid that bat-signal (to co-workers) since I had ignored it for years.
The most annoying thing about all the documentation is it's like "okay so we're going to assume you're making a web-application..." and it's just no! Obviously not! I'm a sysadmin who wants to write scripts, how do I do that?
Me: I have deployed your endpoint into the test environments you requested, with the exception of the one environment we do not have.
Client: Thanks, but can you also get that environment deployed as well?
Me: No, I cannot, because we do not have that environment. I can set one of the other endpoints to point to it, if you want to verify that endpoint works.
Client: Can you please set up the missing environment? Also, can you reconfigure the URIs you are using?
Me (while screaming silently): No, I cannot, because a) we do not have that environment and b) the URI is defined by the cluster the application is running on.
Years ago while interning in the rendering group at Pixar, I learned an important lesson: “interesting” things almost always come to light when a software system is given input with significantly different characteristics than it’s seen before. Even for well-written and mature software systems, new types of input almost always expose heretofore unknown shortcomings in the existing implementation.
I first learned this lesson while Toy Story 2 was in production. At some point, someone noticed that a surprising amount of time was being spent parsing the RIB scene description files. Someone else in the rendering group (I believe it was Craig Kolb) whipped out the profiler and started digging in.
It turned out that most of the parsing time was spent doing lookups in a hash table that was used to intern strings. The hash table was a small fixed size, perhaps 256 elements, and it used chaining when multiple values hashed to the same cell. Much time had passed since the hash table was first implemented and scenes now had tens of thousands of objects, so naturally such a small hash table would quickly fill and become ineffective.
The expedient thing to do was to just make the hash table larger—all this was happening in the thick of production, so there was no time to do something fancy like make the hash table grow as it filled up. One line change, rebuild and do a quick test before committing, and… no performance improvement whatsoever. Just as much time was being spent on hash table lookups. Fascinating!
Upon further digging, it was discovered that the hash function that was being used was the equivalent of:
int hash(const char *str) {
return str[0];
}
(Forgive me Pixar, if I’ve posted super-secret RenderMan source code there.)
The “hash” function had been implemented in the 1980s, at which time someone had apparently decided that the computational expense of actually incorporating some contribution from all of the characters in the string in the hash value wasn’t worth it. (And if you’ve only got a handful of objects in the scene and a 256 entry hash table, maybe, I guess.)
Another historic implementation detail added insult to injury: once Pixar started making movies, the names for objects in scenes had grown fairly long, along the lines of “BuzzLightyear/LeftArm/Hand/IndexFinger/Knuckle2”. However, some earlier phase of the production pipeline used a fixed-size buffer for storing object names and would shorten any longer names, keeping only the end and helpfully adding a few periods to show that something had been lost: “…year/LeftArm/Hand/IndexFinger/Knuckle2”.
Thence, all of the object names the renderer saw were of that form, the hash function hashed all of them to the bucket for ‘.’, and the hash table was actually a big linked list. Good times.
Is there a good regex tutorial for beginners? My wife is picking it up, and I'm honestly not sure I can evaluate a tutorial from the perspective of a beginner.
I strongly suggest she learn the fundamentals of regular expressions (meaning the definition of a finite automaton and how they relate to regular languages). I could recommend a book, but it's kinda expensive.
Children's rights are human rights.
0
Options
Monkey Ball WarriorA collection of mediocre hatsSeattle, WARegistered Userregular
edited July 2018
Hey friendly people, long time no post.
Uh, so I feel like 1) The only acceptable GUI API in this day and age is HTML+CSS+JS, and 2) my Javascript-fu is inadequate given point 1.
I would like some recommendations on good Javascript and/or Typescript learning resources. I did read "Javascript The Good Parts" maybe five years ago, but I've forgotten most of it. Also from what I understand Javascript has changed a lot lately. Lambda syntax? Yes please!
I will say that if it says "node" or "npm" anywhere, I won't use it. I'm want to learn Javascript for browsers specifically. I'm totally good on server-side languages, thanks.
Monkey Ball Warrior on
"I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
0
Options
admanbunionize your workplaceSeattle, WARegistered Userregular
Uh, so I feel like 1) The only acceptable GUI API in this day and age is HTML+CSS+JS, and 2) my Javascript-fu is inadequate given point 1.
I would like some recommendations on good Javascript and/or Typescript learning resources. I did read "Javascript The Good Parts" maybe five years ago, but I've forgotten most of it. Also from what I understand Javascript has changed a lot lately. Lambda syntax? Yes please!
I will say that if it says "node" or "npm" anywhere, I won't use it. I'm want to learn Javascript for browsers specifically. I'm totally good on server-side languages, thanks.
Well the good news is that npm is vital for client-side development as well so you can toss out that restriction!
It's just rather shoddily written, not using mutexes where they should be, starting a job before a job handler is registered leading to occasional situations where the job finishes before the handler is registered, and generally annoying stuff.
Uh, so I feel like 1) The only acceptable GUI API in this day and age is HTML+CSS+JS, and 2) my Javascript-fu is inadequate given point 1.
I would like some recommendations on good Javascript and/or Typescript learning resources. I did read "Javascript The Good Parts" maybe five years ago, but I've forgotten most of it. Also from what I understand Javascript has changed a lot lately. Lambda syntax? Yes please!
I will say that if it says "node" or "npm" anywhere, I won't use it. I'm want to learn Javascript for browsers specifically. I'm totally good on server-side languages, thanks.
All GUI systems have their places though, so pick things that make sense. Do you want something that's accessible from all devices? HTML+JS is the clear winner there, but comes at the pitfall of needing hosting.
If it's just something you want to run locally that may or may not be the best choice still.
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
So yesterday it became official that I was laid off from my job after nearly 8 years. I actually got tipped off about it last week, so I had a lot of time to accept reality when the official hammer hit. It was the first job I ever had, so it's been a pretty interesting experience. It was a big layoff, apparently 15% worldwide (although I also heard as much as 30%). I've already got a first draft of an updated resume, going to be finishing that up soon. I plan to take a couple weeks or so off too. The package I got is pretty good. Adding all the severance and unused vacation, I'll be getting 5 months. I feel like the job market for developers is pretty damn good at the moment (especially where I am, Bay Area) so I'm not too worried about it, just weird that I have to do it involuntarily, haha.
Posts
I'm sure this is how it's supposed to work and I'm all excited over nothing. Still neato-burrito to me.
If anyone wants a copy of the demo beta... I have it available.
edit: should have LMFGTFY'd.
...which looks kind of hideous.
Well that's kind of a hacky way so it looks like xargs. I've never been a fan of the % alias because it explains nothing. (funnily enough, I didn't know what xargs did so the original code was no more enlightening)
and the ampersand isn't necessarily necessary, depends on what your bar command is.
What I would write would be more like: And least there there's only one mysterious symbol so you can guess that it's the current thing in the loop. Or if foo was more complicated I'd probably:
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
"go list" lists packages and excludes vendor dir, so I thought I'd pipe that to golint instead:
Hit a little problem though. When I run "go list" directly, it gives me paths to project packages relative to my GOPATH:
And running golint straight in that repo:
But running the PS'd command gives me full paths:
Small thing, but a bit annoying. Not sure what PS thinks the CWD is when running the command.
I was missing powershell just yesterday as I was working with python!
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
Hmm. I don't know anything about go so I can't help you there. CWD is easy enough to temporarily change in powershell if it comes to it?
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
This collection of words makes no sense!
programmers just don't understand
fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
that's right we're on a fucked up cruise / God is dead but at least we have booze
bad things happen, no one knows why / the sun burns out and everyone dies
Not a tutorial, but https://regex101.com/ is great for testing stuff.
If you have access to Pluralsight, there are some great fundamentals courses on there for just about anything. Here's the one I'd recommend: https://www.pluralsight.com/courses/regular-expressions-fundamentals
https://youtu.be/Q2g9d29UIzk
We moved to slf4j running on top of logback and now we're running into the issue where every instance of a logger context opens a file handle to every single log file defined in the xml, which completely fucks up rolling logs. You can't share appenders across loggers, and you have to assign each appender to a specific logger, so why the hell is it blindly opening file handles. It seems like the answer to this problem is to have unique logback.xml for every process I launch which I find really dumb.
Java :rotate:
Wouldn't some package-protected helper methods basically make all those problems go away? Arguably you shouldn't have to build those on top of a logger library, but... I look at that code snippet you posted, and that could have just been stuck in a helper method and then replaced with a single call to that helper method.
http://www.gskinner.com/RegExr/ is excellent for developing regex's.
Need any pointers? This is pretty much my job.
That was... abrupt. What the hell happened to that service?
That's one of the services that usually doesn't need a whole lot of memory but certain outliers in the jobs it gets can lead to some intensive stuff. Might be we just bump the RAM limit on it.
At the moment I think I'm just engaged in the usual game of "yes, I need full admin access to pretty much everything that's what you hired me for".
I'm also currently threading the needle with the developers of "I will tell you how to work" while stressing that I am also on their side.
Most people only REALLY update it if they're looking. Keeping it semi-current with at least your position isn't a bad idea, but if you spend a lot of time on it that's generally seen as the "job hunting" batsignal.
Hah. I deliberately didn't update it while job-hunting to avoid that bat-signal (to co-workers) since I had ignored it for years.
The most annoying thing about all the documentation is it's like "okay so we're going to assume you're making a web-application..." and it's just no! Obviously not! I'm a sysadmin who wants to write scripts, how do I do that?
Client: Thanks, but can you also get that environment deployed as well?
Me: No, I cannot, because we do not have that environment. I can set one of the other endpoints to point to it, if you want to verify that endpoint works.
Client: Can you please set up the missing environment? Also, can you reconfigure the URIs you are using?
Me (while screaming silently): No, I cannot, because a) we do not have that environment and b) the URI is defined by the cluster the application is running on.
I strongly suggest she learn the fundamentals of regular expressions (meaning the definition of a finite automaton and how they relate to regular languages). I could recommend a book, but it's kinda expensive.
Uh, so I feel like 1) The only acceptable GUI API in this day and age is HTML+CSS+JS, and 2) my Javascript-fu is inadequate given point 1.
I would like some recommendations on good Javascript and/or Typescript learning resources. I did read "Javascript The Good Parts" maybe five years ago, but I've forgotten most of it. Also from what I understand Javascript has changed a lot lately. Lambda syntax? Yes please!
I will say that if it says "node" or "npm" anywhere, I won't use it. I'm want to learn Javascript for browsers specifically. I'm totally good on server-side languages, thanks.
Well the good news is that npm is vital for client-side development as well so you can toss out that restriction!
99 race conditions on the wall...
All GUI systems have their places though, so pick things that make sense. Do you want something that's accessible from all devices? HTML+JS is the clear winner there, but comes at the pitfall of needing hosting.
If it's just something you want to run locally that may or may not be the best choice still.
You get what you pay for.