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
Rubellavator
Aug 16, 2007

The majority of development done here is done on VMs that we remote desktop into that are hosted miles away from us. Aside from the general poor performance, about once every few weeks there's an issue and nobody can do anything for a day. Thankfully I get to develop on a real machine, but occasionally I have to step into that world and it's awful.

Adbot
ADBOT LOVES YOU

prom candy
Dec 16, 2005

Only I may dance

Lumpy posted:

You can have folders in the VM be mounted on your host machine, so you can edit "server" files locally with whatever you want to edit them with. Which for me is MacVim :v: (oh god not another editor derail...)

This is the part I couldn't get working right. One strategy wouldn't actually send file system events, another kept losing sync, etc. I eventually just gave up and went back to doing local development.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Helicity posted:

( more good stuff)

I think I get it now. This is probably a terrible analogy, but basically Docker is "the server" and instead of apt-get install nginx I fire up an nginx container. Instead of installing postGRE, I launch a postGRE container, etc. So I can have project A nginx and project B nginx containers, and project A, B, C postGRE container all just "there" and I just turn them on / off as needed depending on what I'm working on. Then I can save project_a_nginx somehow (along with config files and so on) and then I can run that container anywhere that Docker runs and it will behave exactly the same. That close?

luchadornado
Oct 7, 2004

A boombox is not a toy!

Lumpy posted:

I think I get it now. This is probably a terrible analogy, but basically Docker is "the server" and instead of apt-get install nginx I fire up an nginx container. Instead of installing postGRE, I launch a postGRE container, etc. So I can have project A nginx and project B nginx containers, and project A, B, C postGRE container all just "there" and I just turn them on / off as needed depending on what I'm working on. Then I can save project_a_nginx somehow (along with config files and so on) and then I can run that container anywhere that Docker runs and it will behave exactly the same. That close?

I think you have it.

It's also nice if you want to play with a new database or even an alpha/beta that might conflicting with your existing install - just docker pull, docker run, and then connect to your new instance and play around without impacting your local environment.

Honest Thief
Jan 11, 2009
All this talk of gulp and no one even mentions Grunt anymore :\

luchadornado
Oct 7, 2004

A boombox is not a toy!

Honest Thief posted:

All this talk of gulp and no one even mentions Grunt anymore :\

http://stateofjs.com/2016/buildtools/

Honest Thief
Jan 11, 2009

Sure I know all that, but still, Grunt was so cool..

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Helicity posted:

I think you have it.

It's also nice if you want to play with a new database or even an alpha/beta that might conflicting with your existing install - just docker pull, docker run, and then connect to your new instance and play around without impacting your local environment.

So I followed this: https://docs.docker.com/compose/django/ and it worked the first time. Well, sort of. I had to figure out how to actually run Django commands to sync the DB with Django, but I got it running. Worked on the project a bit, then stopped things with `docker-compose down`. Then after that, after `docker-compose up`, the DB wasn't started before the app server so it wouldn't run. I hacked a workaround for that, then all my data was done (which I guess is by design??) Seems like an interesting thing, and I wish I had a week to mess up enough to actually figure out how to use it, but back to VirtualBox for me!

Another thing that was confusing was that a good percentage of the articles I was reading when it came time to production were just "make a new Dockerfile that installs an ubuntu image and runs a poo poo-ton of commands that use apt-get to install everything" I assume that is not the proper way to do things in Docker-land?

Seems like a very cool concept, but I'm too dumb / time constrained to learn it well enough to use it.

EDIT: and thanks again for your help on "getting" Docker a bit!

Lumpy fucked around with this message at 19:09 on Jul 6, 2017

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

Rubellavator posted:

The majority of development done here is done on VMs that we remote desktop into that are hosted miles away from us. Aside from the general poor performance, about once every few weeks there's an issue and nobody can do anything for a day. Thankfully I get to develop on a real machine, but occasionally I have to step into that world and it's awful.

We did all of our development on remote VMs at the direction of our infrastructure team until I finally got fed up with the poor performance enough to rebel and get us off that poo poo. It was the best thing I ever did.

Honest Thief
Jan 11, 2009
Anyone with experience on Ruby APIs and Jekyll? I want to find a way to host Jekyll Admin https://github.com/jekyll/jekyll-admin on the local work network, but it seems right now it only works by running the ruby gem bundle command and jekyll's serve. If I could simply run a ruby server maybe I wouldn't need to use jekyll serve, no?

ddiddles
Oct 21, 2008

Roses are red, violets are blue, I'm a schizophrenic and so am I
I wanted to read an article about Tesla selling South Australia the worlds biggest battery bank. And it was displayed like this:




That elon musk head floats around.

Who thought this was good UX.

qsvui
Aug 23, 2003
some crazy thing
:thejoke:

Tei
Feb 19, 2011

On my company we don't design websites because everyone design websites, my dog design websites for a bone, I know a rat in the sewers that will install configure and theme for you a wordpress for a half eaten hotdog. But sometimes we design websites because if somebody ask "can you design this for us" we say yes, because we like money and we could do that.
We usually build web application.

So sometimes theres a website the customer made for himself. Maybe he made it in word and then "saved has ...html". Or he followed a tutorial online "how to write html". Or used a wysiwig (what you pay is what you get) editor. THESE things looks bad.


Theres a huge difference between a website that look bad because they wanted to make it that way, but the designers know better. Than a website made by people with bad taste, lack of skills and bad luck.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

ddiddles posted:

I wanted to read an article about Tesla selling South Australia the worlds biggest battery bank. And it was displayed like this:




That elon musk head floats around.

Who thought this was good UX.

actually it's good and cool.

Forgall
Oct 16, 2012

by Azathoth
Another redux-form question: I use it with immutable, but when I look into my store under form I see that syncErrors is a plain object instead of immutable collection. Other parts of the form state, like registered fields, values etc are Maps, but syncErrors isn't. Is it supposed to be like that or am I using it wrong?

smackfu
Jun 7, 2004

For people who run a JavaScript linter like eslint in your build process with WebPack, how do you have it set up? Our WebPack 1 config had it as a pre filter/loader but it's not working in WebPack 2 (still generating the output if the linter has errors) and I'm thinking maybe we are doing it wrong conceptually.

luchadornado
Oct 7, 2004

A boombox is not a toy!

smackfu posted:

For people who run a JavaScript linter like eslint in your build process with WebPack, how do you have it set up? Our WebPack 1 config had it as a pre filter/loader but it's not working in WebPack 2 (still generating the output if the linter has errors) and I'm thinking maybe we are doing it wrong conceptually.

Usually a build/prebuild script like 'npm run lint && webpack' where the lint script calls eslint or whatever. Every process in a shell script will return a status: 0 for success, something positive (usually 1) for error. The double ampersand is an 'and-if' that only runs the second command if the first command was successful. What value do you get from having linting tied in more tightly with webpack?

In reference to discussions we've had in this thread before, this is the type of thing I meant by leveraging bash instead of plugins/modules.

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so
I'm looking to make a simple page that shows a static image, with zones in the image the user can click to link to something. The image may have 20-30 clickable zones in it, and all the zones are either rectangles or circles. I don't want to carve the image and have each image piece link somewhere.

When the user mouses over a zone, I want the page to float some minor text either at the mouse cursor, or nearby. I also want the page to outline the clickable area on mouseover.

I know little about modern web development, though I know basic HTML. I've looked up the HTML Area code to manually "carve out" the clickable zones, and it seems like it could work, but I can't find an easy way to figure out how to size each area, and make the area relative to the image instead of the page, or even if this is the best approach to take.

Any resources or suggestions?

Kekekela
Oct 28, 2004
Noticed this in the overview of the ES2017 spec :

ECMAScript 2017 Language Spec posted:

ECMAScript is an object-oriented programming language

Probably just me but I thought this was pretty interesting. I'm having trouble putting into words exactly why, but I guess I just felt like classes were tacked on vs language defining.

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

PRADA SLUT posted:

I'm looking to make a simple page that shows a static image, with zones in the image the user can click to link to something. The image may have 20-30 clickable zones in it, and all the zones are either rectangles or circles. I don't want to carve the image and have each image piece link somewhere.

When the user mouses over a zone, I want the page to float some minor text either at the mouse cursor, or nearby. I also want the page to outline the clickable area on mouseover.

I know little about modern web development, though I know basic HTML. I've looked up the HTML Area code to manually "carve out" the clickable zones, and it seems like it could work, but I can't find an easy way to figure out how to size each area, and make the area relative to the image instead of the page, or even if this is the best approach to take.

Any resources or suggestions?

If you get the element that has the image, it's a fairly easy matter to use that to find out where the mouse is relative to the image if you start with mouse co-ordinates relative to the page. Something like relativeToImage.X = mouse.X - imageElement.X. Once you can track that, you can then define any number of arbitrary regions, and simply find all the regions your mouse is in, and then show your text.

Tivac
Feb 18, 2003

No matter how things may seem to change, never forget who you are

Helicity posted:

Usually a build/prebuild script like 'npm run lint && webpack' where the lint script calls eslint or whatever. Every process in a shell script will return a status: 0 for success, something positive (usually 1) for error. The double ampersand is an 'and-if' that only runs the second command if the first command was successful. What value do you get from having linting tied in more tightly with webpack?

In reference to discussions we've had in this thread before, this is the type of thing I meant by leveraging bash instead of plugins/modules.

This is basically what I do as well, only using npm scripts.

It's usually "npm build" to run the bundler and then I make a "prebuild" script to run eslint. Accomplishes the same thing as the "&&" but I find it easier to read.

npm is real neat

Munkeymon
Aug 14, 2003

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



Kekekela posted:

Noticed this in the overview of the ES2017 spec :


Probably just me but I thought this was pretty interesting. I'm having trouble putting into words exactly why, but I guess I just felt like classes were tacked on vs language defining.

Prototype (prototypal?) inheritance is a legitimate way to do OO, just different than people are used to, thus the recent addition of class syntax sugar to make them feel safer and more comfortable... and kick the surprises down the road a bit. It's a brilliant trap, really.

Kekekela
Oct 28, 2004

Munkeymon posted:

It's a brilliant trap, really.
Yeah, that's kind of hitting on what felt weird about it to me. Like a talking point for evangelists or to use against nay-sayers.

Tei
Feb 19, 2011

Javascript was not well understood for a long time.

Because was not well understood, people tried once to extend Array.prototype then bad magical things happened, and everyone was scared, confused and angry.

I think it was the lisp people that revived Javascript. They made people recognize the usefulness of closures and other Good Parts, and people returned to javascript and was not scared anymore. Pretending Javascript is a funny version of Lisp is what made Javascript into what is today. But is only a interpretation. you can also pretend Javascript is C, or that Javascript is Perl. Javascript has many personalities. Hell, I have seen people pretend Javascript is Java, and use it like a class based OOP language.

luchadornado
Oct 7, 2004

A boombox is not a toy!

Redux, for all the poo poo I give it, has done a lot for Javascript - it brought functional concepts and event sourcing to the forefront of the mainstream, in that many JS developers have a better handle on these topics than backend developers, which is very cool/strange. I'm a little surprised that Ramda, RxJS, and the like haven't taken off more.

Kekekela
Oct 28, 2004
Yes, its being stated in the spec was what I found interesting. Kind of a "this is how we want to be perceived" statement.

Vesi
Jan 12, 2005

pikachu looking at?
Javascript is an abomination that never should've been born, but now that it's here we'll stick with it for now and just quietly hope for its painless death

Tei
Feb 19, 2011

Vesi posted:

Javascript is an abomination that never should've been born, but now that it's here we'll stick with it for now and just quietly hope for its painless death

This part is true. But also that is a language that you can sincerely love, like a dumb dog that still fight their life to make your happy. Only sometimes returns 22 when you add 2+2.

Tivac
Feb 18, 2003

No matter how things may seem to change, never forget who you are
https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b

npx seems rad, npm is on a roll lately!

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


quote:

Calling npx <command> when <command> isn’t already in your $PATH will automatically install a package with that name from the npm registry for you, and invoke it.

The related gif doesn't show a confirmation dialogue, so start registering your typosquatting packages now and brainstorming amusing things for them to do.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

Helicity posted:

Redux, for all the poo poo I give it, has done a lot for Javascript - it brought functional concepts and event sourcing to the forefront of the mainstream, in that many JS developers have a better handle on these topics than backend developers, which is very cool/strange. I'm a little surprised that Ramda, RxJS, and the like haven't taken off more.

Another thing is Angular which introduced front-end devs to dependency injection concepts, which I don't think was really a thing beforehand in JavaScript? (Happy to be proven wrong)

prom candy
Dec 16, 2005

Only I may dance

Helicity posted:

Redux, for all the poo poo I give it, has done a lot for Javascript - it brought functional concepts and event sourcing to the forefront of the mainstream, in that many JS developers have a better handle on these topics than backend developers, which is very cool/strange. I'm a little surprised that Ramda, RxJS, and the like haven't taken off more.

Dan's love of JS is contagious

M31
Jun 12, 2012

Doc Hawkins posted:

The related gif doesn't show a confirmation dialogue, so start registering your typosquatting packages now and brainstorming amusing things for them to do.

Continuing the proud NPM tradition of not caring about security at all.

Tivac
Feb 18, 2003

No matter how things may seem to change, never forget who you are

Doc Hawkins posted:

The related gif doesn't show a confirmation dialogue, so start registering your typosquatting packages now and brainstorming amusing things for them to do.

M31 posted:

Continuing the proud NPM tradition of not caring about security at all.

https://github.com/zkat/npx/issues/66

lol that this issue was only opened today

smackfu
Jun 7, 2004

Tivac posted:

This is basically what I do as well, only using npm scripts.

It's usually "npm build" to run the bundler and then I make a "prebuild" script to run eslint. Accomplishes the same thing as the "&&" but I find it easier to read.

npm is real neat

Thanks to both of you, we switched to using an npm script for eslint and it seems to be working fine. We are actually building using Maven so we just made the lint npm step a separate goal.

Pollyanna
Mar 5, 2005

Milk's on them.


I'm going to recommend to our team lead that we bring in ESLint to fix our confusion and concerns over spacing, style guides, all that poo poo. Failing that, gently caress, I'll do it myself if I have to.

luchadornado
Oct 7, 2004

A boombox is not a toy!

Tivac posted:

https://github.com/zkat/npx/issues/66

lol that this issue was only opened today

I'm glad we're making some real progress on the incredibly difficult issue of creating an npm script to run mocha with command parameters and having to use that convoluted and newfangled "bash" thing I keep hearing about :rolleyes:

On one end of the spectrum, we have Javascript developers struggling with how to write simple scripts, and on the other, we have Ambromov telling people not to use redux-thunk (a thing *he* made) and to use function composition and partial application to create asynchronous middleware. Efforts to improve the ecosystem and paradigm seem unprioritized and fractured at best.

Pollyanna posted:

I'm going to recommend to our team lead that we bring in ESLint to fix our confusion and concerns over spacing, style guides, all that poo poo. Failing that, gently caress, I'll do it myself if I have to.

This is a great decision. From my experience, people will want to bikeshed over each and every rule, so it might help to explain that one of the goals isn't necessarily in whether you pick spaces or tabs in that debate, but simply in standardizing so that you're all on the same page, every developer's style looks more similar, and you don't waste time talking/thinking about spaces vs tabs. We had 10 web devs and several contractors working on a dozen web apps, and we just took the airbnb default without changing a thing. After a week of using it, no one complained about any of them. You can also use tslint and some rule extensions to get almost the same setup for Typescript apps. Just be wary of having "good citizens" do a PR for a bug and also change the whitespace in 100 files - that pollutes your git blame results and can lead to tons of merge conflicts if you have long-running feature branches.

luchadornado fucked around with this message at 14:01 on Jul 12, 2017

Munkeymon
Aug 14, 2003

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



Doc Hawkins posted:

The related gif doesn't show a confirmation dialogue, so start registering your typosquatting packages now and brainstorming amusing things for them to do.

rm -rf ~ amuses me when it happens to other people so maybe that'll be nocha

Also I'm on windows so I'm immune :smuggo:

e: lol I typo'd the emote

Kekekela
Oct 28, 2004

Helicity posted:



eslint + airbnb config solves soooo many problems on a team. From my experience, people will want to bikeshed over each and every rule, so it might help to explain that one of the goals isn't necessarily to pick a winner in spaces vs tabs debate, but simply to standardize.

This is what we use also, but I make arbitrary carefully thought out decisions on which rules to change and everyone that got hired on after me just has to deal. :hellyeah:

Adbot
ADBOT LOVES YOU

Ghost of Reagan Past
Oct 7, 2003

rock and roll fun

Munkeymon posted:

rm -rf ~ amuses me when it happens to other people so maybe that'll be nocha

Also I'm on windows so I'm immune :smuggo:

e: lol I typo'd the emote
Powershell at least aliases a lot of Unix commands so...

(use Powershell, it's very nice)

EDIT: You're lucky, Remove-Item doesn't take compound commands like -rf, and -f is ambiguous (the equivalent is -Force)

Ghost of Reagan Past fucked around with this message at 16:13 on Jul 12, 2017

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