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
Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

hayden. posted:

I know JavaScript and PHP somewhat well, enough to make some simple AJAX web apps. I want to add an ability for people to log in, though, and instead of building it from the ground up I figured there exists a framework out there already to make it easier. I looked at CodeIgniter and Laravel and didn't see any obvious mentions of having a login module or something. Do I need to use Django or Rails for this kind of thing?

There are also many Auth libraries for CodeIgniter as well. This was the first result for googling 'CodeIgnier authentication library 2013': https://github.com/gilbitron/CodeIgniter-Authme

(please insert your own joke about PHP and security here)

Adbot
ADBOT LOVES YOU

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Winter is Cuming posted:

So, I figured out you can make a working column grid without needing margins by using text-align: justify. Anyone interested?

I read that article last week too.

http://www.barrelny.com/blog/text-align-justify-and-rwd/

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Munkeymon posted:

I imagine it'll be an unpopular opinion, but poo poo like this just depresses me.


I agree whole-heartedly. The "problem" isn't CSS or browsers, or shivs / polyfills (well, maybe a little) but that somehow "the web" is the one place where designers are allowed to completely ignore the constraints of the format / media, and font end guys are supposed to be wizards; and if they fail, it's *their* fault, not the designer's.

Can't remember if it was in this thread or not where I said this, but if a designer was tasked with delivering art for a billboard, and they produced a square piece with alpha transparency at 150dpi, would the printer be blamed if--after telling the designer this was not viable art to print on a billboard, and being told "just make it work!"--the resulting billboard looked like poo poo and wan't see-through in the right spots?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Pseudo-God posted:

Usually you would handle the printing and the layout in the view. Pass the items to the view, and you can put conditionals, HTML tags and the like in there. Don't fill up your controller with non-business logic.

Exactly. Logic in controller, presentation in view. The controller should never know about the display of the items, just that it is supposed to give a list of them to the view.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Ghostlight posted:

I'm doing a site redesign and have been passed a mockup from our (non-web) graphic designer that has a portfolio display in a three column grid, with the images of some projects in the portfolio spanning two columns - it looks nice, but the main feature we're redesigning for is being able to filter through projects by several different criteria and I have no idea how to even begin implementing that sort of design while having the list be able to resort itself arbitrarily so that there aren't blank squares, either dynamically or through forcibly refreshing the page.

It strikes me as a really nice visual element someone else might have solved though. Does anybody have any ideas?

You are describing what is known as the "Masonry" layout.

https://www.google.com/search?q=masonry+layout

Good news: many many people have solved this problem for you.


\/\/ many of the example sites right on the page show variable width content, such as: http://thereason.us/

Lumpy fucked around with this message at 01:45 on Jul 4, 2013

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Oh My Science posted:


[*]Interview Tips
Again, those that are in charge of interviews or hiring a small write up about your companies hiring process. I realize this may be different for everyone but general tips and advice is what I'm after. I know we have a Newbie Programming Interviews thread, should I just link to that?


Having interviewed a lot of folks over the last 5 years, I can rattle off a lot of these, but the most important one is this: If it is on your resume, you should be able to talk at length in an intelligent fashion about it. Soooooo many people slap alphabet soup on their resumes and come to a grinding halt when I ask them about it.

ME: "So I see you have LAMP here on your resume; what distros have you used and tell me what you've learned about installation and configuration since you started using this stack."
THEM: :ohdear:
ME: "Hmm, OK then... says here you have AngularJS experience. What are some things you think could be improved in that framework, and what are some things you think they got 'just right'?"
THEM: :downsgun:

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

gmq posted:

I'm very interested in this. I'm a frontend dev and I have no idea what to put on a portfolio. If I use thumbnails of previous work I'm just showing the web design. I can't always use links as some projects have disappeared or gone offline or were private. What's the best solution for this kind of thing?

If you are a developer, you don't need a portfolio. You can showcase running bits of code maybe as "portfolio pieces", but a link to your bit bucket / github or a project you did all on your own with source is all you really need. You need to prove your are smart and can figure things out, not that you can knock my socks off visually.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

hayden. posted:

I'm using codeigniter for a simple taks list app. It does some AJAX stuff, too. Is the correct way to implement AJAX to somehow tie it into the MVC structure, or is it okay to just have JavaScript calling a PHP file somewhere? It's difficult to Google the answer to this.

Your Ajax calls should be to a controller in your app. If they fulfill they same function as something that already is handled by an existing one, then the same controller that just renders the response differently based on if its an Ajax call or not. If for some reason the Ajax call has a purpose completely unrelated to the rest of your app, it should go in a controller in a separate app.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

kedo posted:

In a nutshell, compatibility view makes IE 8+ act like an older, shittier version of IE. It's a nasty solution for a non-problem... Back in the day lots of websites were coded in a way so that they would only work with a certain version of IE, usually 6. Upgrading to IE 8 would cause these sites to stop working. People got all annoyed, ("I just paid to have this site made and now it doesn't work, wtf Microsoft! :argh:") so instead of taking a strong stance and saying "Get with the time and update your code, schmucks :colbert:" Microsoft caved and created compatibility view.

The problem is that users have no idea what it actually does... they think it's just a magical "fix everything that I think looks broken on the internet" button, when in reality it just takes their lovely browser and makes it even shittier. And of course once they turn it on, 100% of the time they forget to turn it off.

So your boss was actually using an old and crappy Javascript engine without knowing it.

He's using IE8, so he still is

:downsrim:




http://theie8countdown.com/

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Munkeymon posted:

People who use grey text on a slightly lighter grey background should have their teeth introduced to a brick, but it's encouraging to see the numbers so low.

I agree on all points.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

cheese eats mouse posted:

I'm working on a responsive site with Foundation as my base. Anyone know why a table would be off center in a mobile browser if it's set to margin: 0 auto? It shows up fine at mobile size on desktop Chrome, but it's off center in iOS Safari and Chrome. It's really driving me crazy, especially since my images are all centered.

If you have a mac, use remote console otherwise, uh...

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Oh My Science posted:

Has anyone else pissed off family before? My brother wants to to make his website for free because "It would be good for your portfolio" and I told him to gently caress off.

He just bought a giant 55" TV too.

There's only one thing that will cause a bigger rift between you and your family than telling them to gently caress off for spec work: Agreeing to do work for your family. Paid or not.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice
Everyone bookmark this for the next time a client asks for one:

http://shouldiuseacarousel.com/

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

hayden. posted:

Another CodeIgniter question. It's a simple to-do list app, and I have pages for viewing tasks, editing a task, and creating a task.

Is it acceptable practice to have each of these pages have their own function within the controller for displaying them? They each require somewhat unique coding, and for example the view page has no need for all code used in forms on the editing and creating pages.

I know the tutorial shows just having a single "view" function for displaying multiple pages regardless of the content, but all those pages are pretty much the same format and nothing unique about them other than the content being displayed.

"It depends" :v:

A pattern I use frequently is a single edit/create view (since they are the same thing, really... one just happens to be editing something that's not in the DB yet) and a detail view. As with anything, there are exceptions based on use case (i.e lots of required info on create that you cannot later edit might lead you to separate 'create' and 'edit') but having two Views for that is how I would personally do that.


What you described is:

1. getting a list of tasks
2. Presenting a list of tasks
3. getting data for one task
4. presenting single task data in an editable form
5. presenting an empty form for single task creation
6. handling user input for an existing task
7. handling user input for a new task

1, 3, 6, and 7 are "Controller Things"
2, 4, 5 are "View Things"

4 & 5 are so similar they probably are the same thing.
6 & 7 are so similar they probably are the same thing.

The question then is are there three controller things, two, or one? Two Views seem "obvious" here (list presentation and create/ edit) so you're left with how to break up controllers. I'd probably go with two, one for the collection, one for handling individual Task stuff, but there are arguments for other solutions.

Also, if you want to read up on object-oriented design and how to structure applications, the book Practical Object-Oriented Design in Ruby: An Agile Primer is astoundingly good. Don't let the 'Ruby' in the title worry you; it just happens to be the language the examples are in, but if you've never programmed in Ruby before (like me) the syntax is so simple and the explanation so good (and there's not really all that much *code* in the book) that it's not a concern. I really can't recommend that book enough no matter what you are coding in.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

gmq posted:

The beginning of the end of my job if it actually works as advertised. I guess I can always learn and go full stack. :gbsmith:

Good news: nobody has been able to make a WYSWIG editor that works as advertised, and a lot of people have thrown lots and lots of time and money at the problem. Obviously we have to wait and see, but there's so many corner cases and oddities for developing something other than single-pages that while this might be a great tool for helping get a base layout up and running, I wouldn't get all depressed just yet.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

fuf posted:

Yeah that Macaw thing looks pretty amazing.

What was the name of that software that set up some kind of virtual web server really easily? I feel like the word 'up' was involved somehow.

Alternatively: what's the easiest / simplest way for me to set up everything necessary to run Wordpress on an old Ubuntu laptop so that I can do some theme development stuff locally?

https://www.google.com/search?q=set+up+wordpress+on+ubuntu

basically make sure you lave a LAMP stack installed: https://help.ubuntu.com/community/ApacheMySQLPHP
Then install wordpress: https://help.ubuntu.com/community/WordPress

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Oh My Science posted:

I've been a creative cloud user for about a year now and it's the bee's knees. I no longer have to worry about out dated adobe software, and I was able to use my old product key for a discount.

Plus I have access to everything, and some of the preview apps they are working on are cool. Once they release typekit functionality on the desktop it will be even better.

What 95% of people who complain about Creative Cloud mean (and I'm not implying Flaggy is one of this group) is "Awwwwww crap. I might have to start paying for Adobe software now... "

I haven't used it yet (I use Sketch.app now for 99.99999% of my design work) but if the pricing seems steep to some, just add a month of it to your bill per project as a line item "Adobe Cloud Access... $X.xx"

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

kedo posted:

e: Also I took great pleasure in ripping Adobe a new rear end in a top hat in the satisfaction survey they sent around a few weeks ago. I'm sure my words pierced the heart of some Adobe executive somewhere... "My god, this kedo fellow called our business practices abhorrent. He's so right, how can I continue living this lie?"

Yep. That's totally what happened. I'm sure of it. :shepface:

I bet he'll have that quote custom stitched into the leather on his new Ferrari to remind him how terrible he feels.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice
I'm still working my way through this, but here's another good read (so far!) on typography: http://practicaltypography.com/

You can send the 'Typography in 10 minutes' page to clients!

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

haakman posted:

Hello again,

In my first faltering steps into web development I have stumbled across something which I can't get my head around. I'm trying to learn jQuery and Javascript in general, via codeacademy, and say I have code like the below:


there is a ) at the end. There is no corresponding ( anywhere above it. Why does this work? Is this intended? Is it just a quirk of the language that it needs to be there?

Sorry, I expect my question is very, very basic, but any help would be greatly appreciated.

Your code formatted differently:

code:
$(document).ready(
    function() {
        $(firstbox).fadeOut(1000);
    }
);
\/\/ It's OK. We're idiots too.

Lumpy fucked around with this message at 17:30 on Jul 26, 2013

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Suspicious Dish posted:

This site hurts my eyes. Also, the links are invisible.

Please don't treat the internet like a book, even if you really, really want to.

Legible text hurts your eyes? Can you give some examples as to why you disagree, or are you just going to be your normal, dismissive self and not actually provide anyone the benefit of your knowledge? "That sucks" isn't a very helpful critique.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Maluco Marinero posted:

Either way, it's a rather peculiar choice to, in a book about practical application of typographic conventions, decide to throw away the two primary conventions for recognising inline links, colour and underline.

Yes, bad choice on his link style for sure. A vast majority of the info is quite good through. Some day somebody will write something perfect and display it on a web page perfectly. Today is not that day...

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

akadajet posted:

If you block Javascript then I don't really care about you as a user at all.

You must have never designed a website that was supposed to generate revenue.

"Hey boss, our company had 19.1M in expenses, the site only brought in 19M. Good thing we told 5% of our users to gently caress off!"

(Cue: people without JS/ modern browsers would never buy anything online anyway justification...)

If you can't provide a good user experience (note: not astounding or unbelievable, just good enough to get the job done) without javascript / cutting edge Css, its not the users fault.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Maluco Marinero posted:

That's an entirely different thing. If your website is about sales conversion, not high level interaction, the front end shouldn't lock up cause the Javascript hasn't loaded up yet. Modern web applications have prerequisites, they're not the same kettle of fish.

Exactly. saying "people who don't have JS should not be allowed to use the web, and I will never worry about them EVER" is a terrible, dogmatic view. My example was obviously way over the top, but the realities of some web business are that margins are not HUGE. In Q4, 2012 Amazon had $21.2B in sales and $97M in net income (source). Does amazon have a terrible business model? If they lost 5% of their customers because "screw them", do the math on their net income.

If your app / business model requires rich interaction and so on, or you have known endpoints, then by all means, JS only is certainly a viable option. But a blanket "gently caress those people!" ignores the realities of the business as a whole.


Dietrich posted:

If only that hypothetical business had spent the time to make their site workable with javascript blocked, the story would be:

"Hey boss, our company had 24.5M in expenses, the site only brought in 19.1M. Good thing we support MidasWWW!

If only that business had followed a progressive enhancement development process...

Lumpy fucked around with this message at 14:37 on Aug 2, 2013

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Jake Blues posted:

Anyone have experience in learning Objective-J? I'm really excited to dive into this, but want to know if Objective-C or even C++ will be a good precursor to learn.
I took away from the abstract that it's heavily based on Cocoa and Objective-C logic, which I'm at least familiar with but could devote some time to that early if it will benefit me in the long run.

I goofed around with Objective-J a while ago, and I think I would have been utterly lost had I not already know Objective-C / Cocoa from doing some iOS dev beforehand. That said, I don't think getting too deep into Objective-C is really needed... mostly to get used to the weird syntax. Also, I am dumb as a rock, so you might not have any trouble picking it up without it.

Out of curiosity, what has you so excited about it?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Jake Blues posted:

I feel like jQuery and its UI counterpart are an amazing framework, but I'd like to sink my teeth into something a little more comparable to actual object-oriented tendencies. Sadly, I fall into a rut with early antiquated standards in Webdev, having been taught to write entire pages of HTML and CSS out by hand; with more of an emphasis in design. I'd like to get more familiar with the programming side of things so I can improve abilities with more experience in the background functionality.
Objective-J looks to shed a majority of the markup of HTML and CSS, and allow me to experience more than the typical "dynamic" pages I've built by tacking on frameworks and plug-ins. It gives me a complete environment in a language I'm mostly familiar with, to experiment and toy around and hopefully practice more modern web standards in development.
I will definitely brush up on Objective-C, since I'm only competent with C++ and it couldn't hurt to know more about what I'm getting into.

Curse you. Now I want to spend moments of my impossibly rare free time messing with that again. :argh:

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Thermopyle posted:

#web on synirc.

Done.

Go there.

Hooray. I'll idle there during work (I'm veddermatic in IRC land) 9-5 EST. I run a couple channels and familiar with all things IRC if you need or want ops / hops.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Thermopyle posted:

I don't think this has been mentioned yet, but there's a new attack that allows recovery of data from SSL encrypted sessions that are compressed via gzip.

Here's a surprisingly readable paper on the attack.

The current mitigation involves disabling gzip compression on your server or framework.

See! All those people wasting time on "security" are suckers!! My boss is totally right to rely on our cheap, easy to implement "hope nobody every tries anything on one of our servers" strategy. :colbert:

Lumpy fucked around with this message at 03:13 on Aug 12, 2013

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Stuart McSlim posted:

Using RGB colors in CSS is relatively new and doesn't work in crappy old browsers, which is why most people still use hex color codes or a hex color code fallback to RGB colors.

Plus if you've been doing web development for more than a week, hex is just as "easy to read" as RGB, if not easier. If I was going to replace thinking in hex with anything, it would be HSL.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Munkeymon posted:

Do you guys set this on your new work?

code:
<meta name="viewport" content="user-scalable=no, width=device-width" />

No, because users should be able to zoom.

I use: <meta name="viewport" content="width=device-width, initial-scale=1">

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

kedo posted:

No worries... and I'm actually not going to put one of my unsantized proposals online... it contains way too much crap that doesn't make sense for you. :P But my terms is more or less what I described and that's the most important bit. Good contracts build good projects just like good fences build good neighbors.

e: Also, this is a really great read about what you can charge for freelancing, since you seem so blown away by it. Don't give your time away so cheaply!

The CEO of Freshbooks wrote a book about pricing your work / time, that is worth a read: http://www.freshbooks.com/blog/2013/06/12/breakingthetimebarrier/

The gist is don't think "My time is worth $X an hour", think "The thing I am making is will provide $Y in value to the client, so what is *that* worth to them?"

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Boner Slam posted:

.. but then of course the project itself is a top secret Illuminati machinery, used to control the entire population of the Baltic countries to produce, ultimately, the largest IKEA "Lack" table ever built.

You're working on that too?




Oh god.. I've said too much

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

silentpenguins posted:

In case anyone was wondering, that IE9 video got solved when I asked them to re-encode the video. I'm gonna go drink now.

Best practices indicate to start drinking *before* dealing with IE-specific behaviors.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

hedgecore posted:

The bar for CSS has just been raised:

http://codepen.io/juliangarnier/details/hzDAF

(note, no javascript at all)

CSS is the new Flash. I joyfully look forward to a new wave of sites with 'Skip Intro' buttons.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

DreadCthulhu posted:

Is anyone aware of a good text or two on designing modern day distributed web applications, ideally with something like AWS as data center? I've been doing pretty much everything organically so far, so I'm sure I'm either reinventing the wheel or doing something very inefficiently quite often. Would be good to learn a few tricks from the pros.

This is not really what you asked for, but the question made me think of something I read a few months ago about the growing pains Pinterest went through, and what architectures they tried and settled in, and why. Might be helpful to you, might not, but I found it very interesting and helpful: Scaling Pinterest

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Knyteguy posted:

Does anyone have any input on the new Adobe Edge tools? The ones here: http://html.adobe.com/

I'm trying to help my wife learn some web design stuff, and I'm trying to scour what tools she will need. I know that Illustrator and Photoshop are pretty much must haves, but what else? She'll be learning 960gs and stuff, so mostly just the graphical part of it. I'm behind on much of the HTML5 development scene, so anything that might help with that too.

She'll be using Sublime Text 3 as a text editor; I'm trying to keep her away from any WYSIWYG editors.

If she's on a Mac, Keynote and Sketch are my design workflow tools these days. I keep photoshop around because I have to open PSDs, but I stopped designing in it a while back and used Illustrator in it's stead, and then used what I use now more and more to the point that I use them exclusively.

Teach her Semantic HTML and *then* teach her about CSS. Don't bring in 960gs and things that make you add layout-specific markup until late in the game.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Fugue Stater posted:

Hey guys, quick security question about PHP/MySQL. If you're not using user-defined input (but rather something like a $_SESSION['id']), is it OK to do a straight query to the database with $mysqli->query($someQueryString)?

Or should I still use bind_param(), even though the user had no means to affect the variable being bound?

It is never* OK to do a straight query to the database with $someQueryString.





* This is not 100% true, but if you act like it is, nothing bad will happen, and the things you write will be less awful.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice
Bootstrap is a tradeoff: If you need to do things it offers (widgets, etc.) and are OK with non-semantic non-portable markup, then it maybe the right call. I personally find it too heavy-handed, and dislike many of their design decisions, but as others have said, it's a good "get a good looking UI out fast" framework, which is why it became so popular: it opened up that ability to many design-challenged developers who had been rolling their own previously. Unfortunately, most of these UIs are still terrible, but at least are pretty.

So no, don't feel bad about disliking Bootstrap.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

pipes! posted:

line-height: 1.25; please and thank you.

You mean 1.4. Some of us are old. :corsair:

Adbot
ADBOT LOVES YOU

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

QPZIL posted:

As much as PHP gets poo poo on around here, is there any trend of it declining in use among top high-traffic websites?

I like playing around with Rails and Django, I'm just curious about how things are progressing. Are things trending more toward MVC-friendly setups like Ruby and Python frameworks? Toward HTML5? Or is PHP still the frontrunner? Or, professionally speaking, is .NET the go-to development platform when it comes to "top" websites?

Mostly just things I'm curious about. I love learning about web development, even though it'll more than likely just stay a hobby since my main IT focus is networking. But it's still interesting to me to know how things are trending on the backend.

"top" websites like Google, Twitter, Instagram, Pinterest, Facebook, Amazon, etc.? None of them use .NET. None of them use PHP.

It's tough to say what the future will bring, but learning something *other* than .NET and PHP will serve you well. Rails and Django are good choices, but there are many others. My $0.02, and I hope somebody else will offer a "no way, PHP is the way!" reply, because I may well be out of the loop, since I've done everything in my power to avoid that awful, awful language for the last several years.

Lumpy fucked around with this message at 23:35 on Sep 4, 2013

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