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
Jabor
Jul 16, 2010

#1 Loser at SpaceChem

revmoo posted:

Anybody have Firefox poo poo the bed on SSL? I have my FF set to clear all cookies, cache, everything on shutdown, and yet if I load up a fresh instance of FF and browse to a number of sites I get untrusted connection error. I've had other people verify with their copies of FF and it only happens with my copy.

Do you have malware running a man-in-the-middle attack on your connection?

Try comparing the certificate that Firefox is complaining about with the real certificate that other people are seeing.

Adbot
ADBOT LOVES YOU

revmoo
May 25, 2006

#basta

Jabor posted:

Do you have malware running a man-in-the-middle attack on your connection?

Try comparing the certificate that Firefox is complaining about with the real certificate that other people are seeing.

I'm gonna do some further digging. I doubt it's a MiTM because it's only occurring on FF which I only use for development.

Not impossible though, I work at a place that is an extremely ripe target for APT groups so we''re always looking over our shoulders. Remember, just because you're paranoid doesn't mean they're not out to get you!

Data Graham
Dec 28, 2009

📈📊🍪😋



Loezi posted:

This is a thing! :eng101:

It's called a HTTP E-Tag and works essentially like this:

Aha :ms:

I'd seen ETags in the headers a bunch of times but never really dug into what they were. I probably assumed they were part of one of those oddball session/authentication schemes from ages past or something. Thanks!

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
Here, have a thing I made for work:


It's mostly for Symfony2 with Doctrine, but happy for people to let me know if I missed anything important.

\/\/\/\/ Hadn't checked it cause it was only for internal use, but thanks for the spell check.

v1nce fucked around with this message at 01:27 on Mar 9, 2015

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

v1nce posted:

Here, have a thing I made for work:


It's mostly for Symfony2 with Doctrine, but happy for people to let me know if I missed anything important.

How do I use Borwser cache?

epswing
Nov 4, 2003

Soiled Meat
Apparently I don't understand Bower.

When I started using the sb-admin-2 bootstrap template a few months ago, the download zip contained a directory of minified files. When they released a new version, I would just download, unzip overtop the previous version, worked like a charm.

In the latest version, it's been bowerified. When I run bower install startbootstrap-sb-admin-2 I get a directory called bower_components, which contains all the files from the library I want, plus all its dependencies, each in their own directory. But each component contains its own subdir structure, with readmes and example html files and images and gitignore files, and all sorts of crap that I don't want in my source control.

Am I supposed to manually cherry pick out the minified files I'm after?

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

epalm posted:

Apparently I don't understand Bower.

When I started using the sb-admin-2 bootstrap template a few months ago, the download zip contained a directory of minified files. When they released a new version, I would just download, unzip overtop the previous version, worked like a charm.

In the latest version, it's been bowerified. When I run bower install startbootstrap-sb-admin-2 I get a directory called bower_components, which contains all the files from the library I want, plus all its dependencies, each in their own directory. But each component contains its own subdir structure, with readmes and example html files and images and gitignore files, and all sorts of crap that I don't want in my source control.

Am I supposed to manually cherry pick out the minified files I'm after?

Yeah, that's basically bower. Most of the time people make their bower components the whole kitchen sink. Your deployment/build process should cherry pick the files you need and pack them wherever they need to go.

As an aside, many JavaScript client libraries have npm packages with the built files in them, so depending on your use case you may not need bower at all.

Data Graham
Dec 28, 2009

📈📊🍪😋



I've been assuming the way to go is to do my bower stuff outside source control and then copy the finished dist files into the source-controlled area when I'm ready to check in.

Which is a mockery of source control, of course, but whaddyagonnado.

Funking Giblet
Jun 28, 2004

Jiglightful!

Data Graham posted:

I've been assuming the way to go is to do my bower stuff outside source control and then copy the finished dist files into the source-controlled area when I'm ready to check in.

Which is a mockery of source control, of course, but whaddyagonnado.

Bower packages usually expose the required files through the "main" config section, which a lot of thirdparties rely on. You can use gulp + main-bower-files to select these files and place them in a dist. You can also override the main section yourself.

As for committing, you should always commit the bower_components folder, but filter it out of the final release. This is because you will be relying on lovely bower servers otherwise, and your development will come to a halt if someone new needs to call "bower install" and the server is down. The problem will materialise when you want to change what stuff you require from the package.

Kobayashi
Aug 13, 2004

by Nyc_Tattoo

Funking Giblet posted:

As for committing, you should always commit the bower_components folder, but filter it out of the final release. This is because you will be relying on lovely bower servers otherwise, and your development will come to a halt if someone new needs to call "bower install" and the server is down. The problem will materialise when you want to change what stuff you require from the package.

People should do that, but in practice it is rare. Which really sums up modern web development in general: An impenetrable rat's nest of "do as I say, not as I do" and half-rear end tools and frameworks that enforce all the weird aspects of their vision but none of the actual best practices.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Data Graham posted:

I've been assuming the way to go is to do my bower stuff outside source control and then copy the finished dist files into the source-controlled area when I'm ready to check in.

Which is a mockery of source control, of course, but whaddyagonnado.

The way I do my bower stuff is to not use anything that requires I install it with bower.

epswing
Nov 4, 2003

Soiled Meat

Maluco Marinero posted:

Your deployment/build process should cherry pick the files you need and pack them wherever they need to go.

OK. So it's as stupid as I thought.

Data Graham posted:

the way to go is to do my bower stuff outside source control and then copy the finished dist files into the source-controlled area when I'm ready to check in.

Sounds like a lot of work for not much gain.

Funking Giblet posted:

As for committing, you should always commit the bower_components folder, but filter it out of the final release.

I'm absolutely not dumping the contents of 12 git repositories into my source control, complete with example html files and readmes. Who does this??

Lumpy posted:

The way I do my bower stuff is to not use anything that requires I install it with bower.

I'm using sbadmin2, which until now, didn't have anything to do with bower :(

What have these kids done to my internet :negative:

epswing fucked around with this message at 16:43 on Mar 10, 2015

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

epalm posted:



What have these kids done to my internet :negative:

They've infused it with The New Hotness™

epswing
Nov 4, 2003

Soiled Meat

Lumpy posted:

They've infused it with The New Hotness™

As long as it's Web Scale :rolleyes:

Funking Giblet
Jun 28, 2004

Jiglightful!

epalm posted:

I'm absolutely not dumping the contents of 12 git repositories into my source control, complete with example html files and readmes. Who does this??

If you use a workflow that utilizes bower, you need to, or you expose yourself the second bower stops responding (which it does). If you use it locally only, and just keep the output in source control, then that's fine, but why use bower in the first place, just download the js file and store it. Notice I never said it was a good thing. I think people are spending far too much time writing gulp files if you want my opinion when they should be writing their own code for their own apps.

Thermopyle
Jul 1, 2003

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

Funking Giblet posted:

just download the js file and store it.

If I can't do this, or if I can't use npm to install it, 9 times out of 10 I'll just find an alternative to using it.

I hate messing with this poo poo.

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

Can somebody who uses a _typography.scss partial explain to me the benefits of doing so? In my limited experience I've found it to be a pain, but maybe I'm not doing it right. To me it seems that _typography forces me to split up what should be single rule sets into two separate rule sets, thus complicating things. Say for instance I have a class of .button, which has both formatting styling rules (position, margin, etc.), and typographical styling rules (font-family, color, etc.). They're now spread across two different .scss files. Every time I need to make a change to .button, I first have to ask myself "Is this a formatting thing or a typography thing?" and I go to the appropriate file. More brain power, more work. Or am I totally misunderstanding something?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

caiman posted:

Can somebody who uses a _typography.scss partial explain to me the benefits of doing so? In my limited experience I've found it to be a pain, but maybe I'm not doing it right. To me it seems that _typography forces me to split up what should be single rule sets into two separate rule sets, thus complicating things. Say for instance I have a class of .button, which has both formatting styling rules (position, margin, etc.), and typographical styling rules (font-family, color, etc.). They're now spread across two different .scss files. Every time I need to make a change to .button, I first have to ask myself "Is this a formatting thing or a typography thing?" and I go to the appropriate file. More brain power, more work. Or am I totally misunderstanding something?

It's a widget / control thing, not a typography thing. Obviously there's no "right" answer to this, but to me, typography is headers, body copy, lists, etc. Buttons and navigation aren't those things, they are "functional". So button type, color, etc. have nothing to do with my typography.

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS

caiman posted:

Can somebody who uses a _typography.scss partial explain to me the benefits of doing so? In my limited experience I've found it to be a pain, but maybe I'm not doing it right. To me it seems that _typography forces me to split up what should be single rule sets into two separate rule sets, thus complicating things. Say for instance I have a class of .button, which has both formatting styling rules (position, margin, etc.), and typographical styling rules (font-family, color, etc.). They're now spread across two different .scss files. Every time I need to make a change to .button, I first have to ask myself "Is this a formatting thing or a typography thing?" and I go to the appropriate file. More brain power, more work. Or am I totally misunderstanding something?

Your typographical styling rules should be in typography (imo) I use a typography partial and ANY calls to font-family, color, size, etc go in there

The reason you do this is to ensure that EVERY button looks the same. Your teammates should understand that ALL font changes go in the typography area.

Leshy
Jun 21, 2004

The idea of using partials is that you split up your CSS into easy to read and manage chunks. If you later want to change some fonts on your site, you don't have to search through your complete CSS file for all the font statements, but you simply open up _typography.css and have them neatly organised right there.

It is a bit more work when you write your CSS for the first time as you have to pay attention as to which declarations go into what file, but it makes management after that easier. It really depends on what kind of site you are running, how much CSS you have to begin with and how many other people will be editing the site in the future.

Are you running your own small-scale homepage with a limited amount of pages and little CSS? Then decide for yourself if using partials is worth it (but if you're already using SASS, why not?). Are you managing a large-scale site which has a ton of CSS and which will have other people working on it in the future? Then splitting up your working files into easy to use, documented partials might be a good idea.

Lumpy posted:

to me, typography is headers, body copy, lists, etc. Buttons and navigation aren't those things, they are "functional".
Typography is the art of setting text. The color of the button itself isn't typography, but the font-size and line-height of the text on the button are.

down with slavery posted:

The reason you do this is to ensure that EVERY button looks the same.
While your post is otherwise correct, using partials doesn't ensure this at all and visual consistency isn't the reason to use them :)

Leshy fucked around with this message at 21:11 on Mar 10, 2015

o.m. 94
Nov 23, 2009

caiman posted:

Can somebody who uses a _typography.scss partial explain to me the benefits of doing so? In my limited experience I've found it to be a pain, but maybe I'm not doing it right. To me it seems that _typography forces me to split up what should be single rule sets into two separate rule sets, thus complicating things. Say for instance I have a class of .button, which has both formatting styling rules (position, margin, etc.), and typographical styling rules (font-family, color, etc.). They're now spread across two different .scss files. Every time I need to make a change to .button, I first have to ask myself "Is this a formatting thing or a typography thing?" and I go to the appropriate file. More brain power, more work. Or am I totally misunderstanding something?

You're not wrong. The thing is, you have to treat structural approaches to CSS/SCSS like code styling. Everyone has a favorite approach, but the main thing is that everyone has to agree on one approach and stick to it. Consistency trumps additional the extra bit of cognitive load that some people may feel. For instance, I loathe this indentation style:

code:
for (foo) {
   bar();
} else {
  baz();
}
I seriously hate it. I hate the poo poo out of it. But if that's what's been agreed by the team, or that's how the code is structured, as long as it's consistent, I'll pull up me breeches and get on with it, even though when I look at it it appears to me a jungle of brackets and sloppiness. I find the same approach is needed with CSS - because that's where consistency becomes even more important.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Leshy posted:


Typography is the art of setting text. The color of the button itself isn't typography, but the font-size and line-height of the text on the button are.


Correct, but for breaking up my styles into partials, I think of that as belonging in a _controls file rather than the _typography one. It's all semantics in the end but my brain keeps those things in different files. Of course, _controls is more than welcome to import _typography....

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS
I'm sure this question has been answered before, but what are people's thoughts on MongoDB and NOSQL becoming more and more popular. Stupid question time: What kind of problems does NoSQL work for where a traditional DB like Postgres wouldn't?

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

down with slavery posted:

Your typographical styling rules should be in typography (imo) I use a typography partial and ANY calls to font-family, color, size, etc go in there

The reason you do this is to ensure that EVERY button looks the same. Your teammates should understand that ALL font changes go in the typography area.

The thing I don't understand is how using a typography partial ensures every button looks the same any more than simply using, say, a buttons partial. Every button WILL look the same as long as it has a class of .button, regardless of whether or not the rules for .button are split up across multiple partials.


Leshy posted:

The idea of using partials is that you split up your CSS into easy to read and manage chunks. If you later want to change some fonts on your site, you don't have to search through your complete CSS file for all the font statements, but you simply open up _typography.css and have them neatly organised right there.

It is a bit more work when you write your CSS for the first time as you have to pay attention as to which declarations go into what file, but it makes management after that easier. It really depends on what kind of site you are running, how much CSS you have to begin with and how many other people will be editing the site in the future.

Are you running your own small-scale homepage with a limited amount of pages and little CSS? Then decide for yourself if using partials is worth it (but if you're already using SASS, why not?). Are you managing a large-scale site which has a ton of CSS and which will have other people working on it in the future? Then splitting up your working files into easy to use, documented partials might be a good idea.

Just to be clear, I am using partials. It's just that none of my rule sets are divided up between multiple partials. The rules for .button are included in one, and only one, .scss file.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

down with slavery posted:

I'm sure this question has been answered before, but what are people's thoughts on MongoDB and NOSQL becoming more and more popular. Stupid question time: What kind of problems does NoSQL work for where a traditional DB like Postgres wouldn't?

Storing and reading arbitrary, schema-less stuff quickly. Although with hstore Postgres can sort of do that too now.

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS

Lumpy posted:

Storing and reading arbitrary, schema-less stuff quickly. Although with hstore Postgres can sort of do that too now.

Do you have a few examples as to where this might be useful? I'm just having trouble putting together why you'd want the database without the schema, that just seems like a recipe for problems down the road.

Funking Giblet
Jun 28, 2004

Jiglightful!

down with slavery posted:

Do you have a few examples as to where this might be useful? I'm just having trouble putting together why you'd want the database without the schema, that just seems like a recipe for problems down the road.

Something like Products with attributes not represented by a schema.

A TV could have Size, Color, Weight, Number of HDMI ports etc,
A Dress could have Size, Color, Fabric etc.

Getting these out of the database means joins, and searching means multiple joins and terrible performance (think of attribute value counts in the millions). DeNormalizing this into a flat structure means the entire structure can be gotten via a single key, extremely quickly as well as indexed created to represent different dimensions on the data. NoSql generally uses the idea of Documents (others might use graphs) to store data containing any number of fields. Things get interesting when you use SQL and NoSql together, in something like a CQRS pattern, where NoSql represents views of the relational data for quick queries, and Sql is used for writes which is replicated across.

Leshy
Jun 21, 2004

Lumpy posted:

Correct, but for breaking up my styles into partials, I think of that as belonging in a _controls file rather than the _typography one.
Of course, you're entirely free to use partials however you want. As long as you're consistent and any people you might work with are on the same page, it's all good. But see also below:

caiman posted:

Just to be clear, I am using partials. It's just that none of my rule sets are divided up between multiple partials. The rules for .button are included in one, and only one, .scss file.
Imagine that six months from now, you decide on a different font for your site; say you've decided to get a subscription to a webfont service and you're switching from Arial to Proxima Nova. The fonts don't entirely match up in size, so you'll have to do some tweaking to make sure everything fits nicely.

If all of your typography CSS is in a separate _typography.scss, you open that up and see exactly where you've declared what font and which elements are using which variations. Did your .button use a bolded, 2px larger version of the default 16px Arial? Easy enough to make the necessary changes so that your Proxima Nova text fits nicely onto the button as well.

Or did you decide to keep your font styles together with the class when you declared it? Now you're going to have to hunt it down. Did you declare .button in your main stylesheet, or did you consider it a control and did you put it in your partial _controls? And where did you put the font styles for that dropdown box in your navigation bar? Was that in _controls too, or was that in _navigation? And in what other partials did you also make font declarations that you'll have to adjust? Better go check them all.

Data Graham
Dec 28, 2009

📈📊🍪😋



Funking Giblet posted:

Something like Products with attributes not represented by a schema.

A TV could have Size, Color, Weight, Number of HDMI ports etc,
A Dress could have Size, Color, Fabric etc.

Getting these out of the database means joins, and searching means multiple joins and terrible performance (think of attribute value counts in the millions). DeNormalizing this into a flat structure means the entire structure can be gotten via a single key, extremely quickly as well as indexed created to represent different dimensions on the data. NoSql generally uses the idea of Documents (others might use graphs) to store data containing any number of fields. Things get interesting when you use SQL and NoSql together, in something like a CQRS pattern, where NoSql represents views of the relational data for quick queries, and Sql is used for writes which is replicated across.

This basically just means a lot of data duplication, right?

I mean, the whole point of relations and joins is so you can store data as uniquely as possible, and joins/indexes are there to make this feasible. You can always just do enormous flat key/value stores, but inevitably you're going to replicate every attribute that would otherwise be in a joined table.

Sure is fast though.

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
Anyone know a great site for learning about media queries and responsive design, overall?

unpacked robinhood
Feb 18, 2013

by Fluffdaddy
Anyone with a clue as to why the pictures in my gallery open halfway in the bottom of the page instead of using the existing space on screen ? I used a jQuery plugin called Boxer

Mister Chief
Jun 6, 2011

Looks like it's centered relative to the document (whole page), not the viewport (what you can see).

unpacked robinhood
Feb 18, 2013

by Fluffdaddy

Mister Chief posted:

Looks like it's centered relative to the document (whole page), not the viewport (what you can see).

The whole page is visible on my screenshot. The div with the "contact" button is the last visible element on the page, the scrollbars appear after I click on a thumbnail.

Funking Giblet
Jun 28, 2004

Jiglightful!

Data Graham posted:

This basically just means a lot of data duplication, right?

I mean, the whole point of relations and joins is so you can store data as uniquely as possible, and joins/indexes are there to make this feasible. You can always just do enormous flat key/value stores, but inevitably you're going to replicate every attribute that would otherwise be in a joined table.

Sure is fast though.

Speed is all that matters really, disk is relatively cheap for the performance you can get by doing it this way. It's basically a queryable cache (which you then cache anyway :P)

Leshy
Jun 21, 2004

unpacked robinhood posted:

Anyone with a clue as to why the pictures in my gallery open halfway in the bottom of the page instead of using the existing space on screen ? I used a jQuery plugin called Boxer
Got a link to an example page where the issue happens? It's hard to tell where it's going wrong from just a screenshot.

unpacked robinhood
Feb 18, 2013

by Fluffdaddy

Leshy posted:

Got a link to an example page where the issue happens? It's hard to tell where it's going wrong from just a screenshot.

Nah it's uploaded nowhere. I'll redo it from scratch and hope I catch the step where it goes wrong. Thanks though!

caberham
Mar 18, 2009

by Smythe
Grimey Drawer
loving hell

https://generalassemb.ly/education/web-development-immersive/los-angeles

12k for crazy boot camp? That's a crazy amount of money. Granted I'm sure that environment really puts you in boot camp and all, but if you spend 1 year on your own learning, you probably can learn basic css/html/javascript right?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

caberham posted:

loving hell

https://generalassemb.ly/education/web-development-immersive/los-angeles

12k for crazy boot camp? That's a crazy amount of money. Granted I'm sure that environment really puts you in boot camp and all, but if you spend 1 year on your own learning, you probably can learn basic css/html/javascript right?

My guess is the networking and contacts you make are equally or more valuable than the coding bits. I don't really know much about that one, but the boot camp stuff I see all seems very heavy on the "we put you in front of people who are hiring" thing.

\/\/ well then I feel bad for people who go to those things!

Lumpy fucked around with this message at 14:24 on Mar 11, 2015

revmoo
May 25, 2006

#basta

Lumpy posted:

but the boot camp stuff I see all seems very heavy on the "we put you in front of people who are hiring" thing.

They're literally just ctrl+c / ctrl+v Devry. Sure there's some differences as far as classes, timeframe, cost, but it's basically the same concept. If you're going to spend > 10k on a school it needs to come with transferable credits.

Adbot
ADBOT LOVES YOU

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

down with slavery posted:

Do you have a few examples as to where this might be useful? I'm just having trouble putting together why you'd want the database without the schema, that just seems like a recipe for problems down the road.

An example where we planned on using it at one of my old jobs was in an app that was used for data collection. What was captured varied by the user, and the individual business they were working with at the moment. There were some commonalities, like name, address, etc. but a large part of the data was arbitrary key / value stuff that may or may not be nested, and more importantly, was very specific to each place. Since only one user of the app worked with their set of businesses, we didn't need to worry about speed of searches on that data, so we just serialized each business as JSON and dumped it into a document store, as a collection under the user ID of the person creating the records.

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