|
MononcQc posted:Hatin' on people writing poo poo HTML/CSS. The issue is the number of programmers who think it's just another language to use instead of a substantially different cross-disciplinary skill. More and more, you want to see a GUI specialist working the presentation layer. I learned HTML 4.0 back in 1997 and I still use tables for layout, but that's because I don't have artistic talent to design pages and I don't need to make things look pretty anyhow, just functional.
|
# ? Jul 25, 2011 17:23 |
|
|
# ? May 15, 2024 16:05 |
|
baquerd posted:The issue is the number of programmers who think it's just another language to use instead of a substantially different cross-disciplinary skill. The other issue is CSS isn't a proper language, with no support for variables or functions, so it's a huge pain in the rear end to use if you are a programmer. If CSS had started out like less or sass maybe it wouldn't be so horribly abused. quote:I still use tables for layout Can't fault you for that one. Why CSS doesn't have a columns: 2 is beyond me.
|
# ? Jul 25, 2011 18:14 |
|
pokeyman posted:Can't fault you for that one. Why CSS doesn't have a columns: 2 is beyond me. So people can write articles and books with titles like "Creating fluid 3-column layouts in 65535 simple lines of CSS!" "Creating fluid 3-column layouts that don't work quite right in any browser in 6 simple lines of CSS" etc
|
# ? Jul 25, 2011 19:23 |
|
Am I alone in thinking that CSS would be markedly easier to deal with if there were something like a layout: horizontal flag that would "make this container and children go sideways instead of down"? That seemed to come up a lot in my previous job and it seemed to always devolve into loving around in JS to make it happen. Making some of the keywords make sense would also be nice, but that ship sailed a long time ago.
|
# ? Jul 25, 2011 20:22 |
|
pokeyman posted:The other issue is CSS isn't a proper language, with no support for variables or functions, so it's a huge pain in the rear end to use if you are a programmer. If CSS had started out like less or sass maybe it wouldn't be so horribly abused. Less.js is amazing and does fix a lot of the warts. Still not perfect though
|
# ? Jul 25, 2011 20:38 |
|
It's to the point now where I don't even know what CSS is >for< anymore, since it's been manhandled into so many roles, and seems worst-suited to what it was originally intended for (a nice portable way of presenting formatting). It seems like to do anything worthwhile with it you have to have JQeury, JSON, less.js, etc. etc. unless all you're doing is changing link behaviour and image alignments. I think making it a 'proper' language is almost moving in the wrong direction because it just becomes a less ugly JS with relatively sane markup and totally insane everything else.
|
# ? Jul 25, 2011 21:20 |
|
Scaramouche posted:It's to the point now where I don't even know what CSS is >for< anymore, since it's been manhandled into so many roles, and seems worst-suited to what it was originally intended for (a nice portable way of presenting formatting). It seems like to do anything worthwhile with it you have to have JQeury, JSON, less.js, etc. etc. unless all you're doing is changing link behaviour and image alignments. I think making it a 'proper' language is almost moving in the wrong direction because it just becomes a less ugly JS with relatively sane markup and totally insane everything else. 99.5% of hacks and so on aren't needed if people simply 1) used a real reset.css and 2) used minimal, valid, sematic markup. Sadly, 94.6% of people calling themselves Web Designers (or web developers, or whatever the hell they call themselves these days) do not do either of those things.
|
# ? Jul 25, 2011 22:07 |
|
It sure doesn't help that most frameworks generate pretty insane markup. For example, we're using Struts2 and the markup for a simple label + (populated) text input field is this:code:
|
# ? Jul 25, 2011 22:15 |
at workcode:
|
|
# ? Jul 26, 2011 00:14 |
|
Lumpy posted:99.5% of hacks and so on aren't needed if people simply 1) used a real reset.css and 2) used minimal, valid, sematic markup. Ever since I stopped accommodating IE6 I haven't used a single hack. CSS is great and simple if you know what your doing. If you still think tables are a good idea you really need to pick up a new book on website development. The main problem with CSS is that 90% of the tutorial websites out there give out either outdated our completely wrong techniques.
|
# ? Jul 26, 2011 02:03 |
|
Python is a wonderful language:code:
code:
|
# ? Jul 26, 2011 04:25 |
|
VerySolidSnake posted:Ever since I stopped accommodating IE6 I haven't used a single hack. CSS is great and simple if you know what your doing. If you still think tables are a good idea you really need to pick up a new book on website development.
|
# ? Jul 26, 2011 04:59 |
|
_aaron posted:Not to derail too much, but I'd like to get into some web development, and I'd like to avoid these bad tutorials. Any suggestions for where to start learning? I've been learning Python lately, and I like it, so maybe something where I can put that to use? Your intuition regarding derails is spot on! Hit up the web dev thread for more. But basically, figure out the box model (box = size + padding + border, margins don't count towards size, margins collapse each other) and positioning (absolute, relative, and fixed all start their own coordinates for child elements) and you can figure most of it out. Also you can make shapes!
|
# ? Jul 26, 2011 06:44 |
|
Munkeymon posted:Am I alone in thinking that CSS would be markedly easier to deal with if there were something like a layout: horizontal flag that would "make this container and children go sideways instead of down"? wouldn't that be about floats, or you mean automatically scrolling to the sides rather than down when the width of the page is filled?
|
# ? Jul 26, 2011 16:47 |
|
MononcQc posted:automatically scrolling to the sides rather than down when the width of the page is filled? Yep, except that I was thinking it should be valid for any block level element. <div style='flow: right'> for example It's probably the result of not knowing by heart the magic words to use to fake the same idea in actual CSS
|
# ? Jul 26, 2011 19:31 |
|
I'm honestly at the point where I'd almost rather just write a Javascript-based layout manager for my HTML content, in the same vein as modern GUI layout managers, instead of CSS. (And thanks to HTML5, I could use data attributes!) Some web toolkits already have similar things, but something lightweight and simple without any other dependencies could be nice. (And what assholes don't have Javascript enabled nowadays?) Of course, something like that could very well end up in this thread.
|
# ? Jul 26, 2011 22:30 |
|
Sproutcore used to do just that, but it was so much a pain in the rear end they now do HTML templates for regions instead. CSS is just fine if you use a good reset.css and use a good grid or blueprint. Much of the CSS problems, even IE layout problems, go away when doing both. Even strictly Photoshop only designers love CSS grid systems!
|
# ? Jul 26, 2011 23:17 |
|
We don't use any version control system. In fact, the entire development process is as follows: 1. Install the in-house MegaCMS™. It's Zend-Guard encrypted, ofc. 2. Copy over the files for the portion we're changing to our private sites, from the private "developer server" (that is, a webserver with a lot of development files and a copy of the source code). 3. Make changes on our personal site. 4. Ship the changes over to the lead developer/CTO who will implement it the next time he does a release (currently about every 1 1/2 months), assuming it gets into that release. That's not even getting into the code, which is abysmal. There's no documentation — even to the point the programmers are tasked with "mak[ing] a cheat sheet" on how to use one of the few classes we have, a formbuilder/validation system — almost no comments, and the various files are (ofc) Zend Guarded. I tried asking for a copy of the source to go through and got reminded that we're supposed to develop on our encrypted copies.
|
# ? Jul 27, 2011 19:39 |
|
Zamujasa posted:We don't use any version control system. I'd go on a rampage.
|
# ? Jul 27, 2011 19:49 |
|
Zamujasa posted:We don't use any version control system. is this? Why are you still working there?
|
# ? Jul 27, 2011 19:54 |
|
Zamujasa posted:We don't use any version control system. Wow. lovely processes are usually just the result of poor planning, but that one sounds outright hostile.
|
# ? Jul 27, 2011 19:56 |
|
Zamujasa posted:We don't use any version control system. A coworker of mine told me about having to send a binary diff over a fax to have someone manually enter to resolve a bug. That's convoluted, but done out of necessity as it was in some ancient system to which no one had the source code. But holy hell, that environment sounds hostile and I advise you to get out as soon as possible.
|
# ? Jul 27, 2011 20:42 |
|
The reason I'm still here is because it's my first (professional) job as a programmer. I've been considering throwing my resume around to try to get something better now that I have real experience, but yeah. The fact that my super likes rewriting my code because it doesn't match his programming style infuriates me; even poo poo like brackets. I prefer having the opening brace on the same line, he doesn't, so he goes through and modifies every line, usually copypasting parts of it into different files for whatever reason. (We have "logic" files and "output" files, and the distinction of what does what is rarely clear, so I usually create the data in the logic file and shove it in a container in the output one.) We use a "database functions file" that I think I found an old copy of on some free PHP scripts site dating back to 2000. It's literally just every mysql_XXXXXXXXXXX function but renamed to have "db_" instead, and an error handler that kills the page and force-redirects you to another one if your query bombs. Better hope you had that URL memorized, since the back button just got trashed. There's no added functionality either, and my super actually thought it would be possible to write a wrapper to convert queries — as in, raw MySQL queries — to fit other database query languages. All the database tables are MyISAM, so no foreign keys. The naming is inconsistent and random. Keep in mind that we offer payment gateway integration and forms to take payment, as well as an ecom thing. I mentioned possibly switching over to InnoDB and using foreign keys (and possibly something to make database schema other than phpMyAdmin). Response? "I don't think we need them." I personally use MySQL Workbench to set up database tables, but all of the relationships I map out are discarded since we use MyISAM. Two days ago I spent some time writing a system for MediaWiki-like hooks where functions will check for user-added functions and run them to provide extra functionality or some other feature. I used a static class to keep it self-contained and easily separate. When I last saw him looking at it he had stripped the class and first function (getHooks) and was simply using a global variable to store the hooks and for the latter calls to runHooks. My favorite was him complaining about resource usage (each page takes about 4+ MB of RAM). There's a ton of useless crap loaded on every page, like HTML templates for blog posts and other crap. So rather than clean some of that up, he assumed that loading all the hooks into an array at the start could be "optimized" better. Here's the code I wrote, just so you can see how it looks (and a nice example of my programming). Keep in mind that I'm not very skilled with object-oriented programming and haven't had much in the way of time or reason to work with it other than self interest. php:<?php class Hooks { // Array for the hooks to be stored. private static $hooks = array(); // Fetches hooks from the database and sets the property to contain them. // Runs only once, but can be run again. public static function getHooks() { /* Ordinarily there would be a DB call here, but this is just an example, so go with it. Array structure: moduleid Hook Name Function to run 1 signupComplete CreateCreditsData SetUserRandomValue signupAttempt CheckSpammerEmails DoSomethingUseful 2 commentAttempt CheckSpammerComment ItsLikeMagic commentPosted NotifySiteAdmin */ // No query yet, use example data self::$hooks = array( 1 => array( 'test' => array ( "testAlter", "testMessage", ), ), ); } // When called from an internal feature, will call a series of functions. // Returns TRUE if all hooks completed, or FALSE otherwise. // For example, if you wanted to check an email address against a spammer DB, // You would add a hook to the signup page, and cancel it if it returned false. // // Call: // Hooks::runHooks( <module id>, <hook>, <arguments> ) public static function runHooks($module, $hook, &$args = null) { // No hooks for this function, return. if (!isset(self::$hooks[$module][$hook])) { return true; } // Loop through all hooks. foreach (self::$hooks[$module][$hook] as $hookfunc) { // If the function exists, run it: if (function_exists($hookfunc)) { // If it returns true, continue running hooks; otherwise, abort and return false. if (!call_user_func_array($hookfunc, array(&$args))) { return false; } // If the function doesn't exist, exit and throw an error } else { trigger_error("Hook $hook tried to call $hookfunc but that function doesn't exist", E_USER_ERROR); return false; } } // All hooks ran successfully. return true; } } // Set up the hooks and such. Hooks::getHooks(); // Test hook function 1 function testAlter(&$arg) { print "testAlter: setting to uppercase...<blockquote>"; var_dump($arg); print "</blockquote>"; $arg[0] = strtoupper($arg[0]); return true; } function testMessage($message) { print "testMessage: Dumping arguments.<blockquote>"; var_dump($message); print "</blockquote>"; return true; } $testArray = array("Just testing here", "I'm another string"); print "Initial data:<blockquote>"; var_dump($testArray); print "</blockquote>"; print "\nTesting hooks...\n\n"; Hooks::runHooks(1, "test", $testArray); print "Checking what we got back:<blockquote>"; var_dump($testArray); print "</blockquote>";
|
# ? Jul 28, 2011 00:04 |
|
Zamujasa posted:Learn everything you can that you deem valuable, then brush off your resume and move on. You sound like me 2 months ago; year of the job etc. Pay raise, and I'm actually using awesome technology and awesome tools and work for an awesome company. In 2 years you wont even need to include your current place on a resume.
|
# ? Jul 28, 2011 01:28 |
|
Zamujasa posted:The fact that my super likes rewriting my code because it doesn't match his programming style infuriates me; even poo poo like brackets. I prefer having the opening brace on the same line, he doesn't, so he goes through and modifies every line That is pretty terrible. If he never makes you fix that poo poo yourself, you're never going to stop doing it.
|
# ? Jul 28, 2011 01:48 |
|
Set up your IDE to auto-format then? Also, bracket on next line is the best way to make code readable.
|
# ? Jul 28, 2011 01:52 |
|
Ensign Expendable posted:Also, bracket on next line is the best way to make code readable. Liiiiieesss. Seriously, other BS aside, I think I would just match his coding style in terms of braces and indentation and such. The most important thing about style is to do it consistently. EDIT: Also, get out of there before you succumb to his influence and become poo poo.
|
# ? Jul 28, 2011 01:58 |
|
Ensign Expendable posted:Also, bracket on next line is the best way to make code readable. Like hell it does. I strongly prefer having the opening brace on the same line. I really hate all those useless extra opening bracket lines more and more every day I see with them. But our coding style wasn't my decision, so I'm stuck with it. If I'm reviewing your code and you have the opening brace on the same line, I'll cry a little inside while I tell you to fix it. You don't violate the coding conventions of your team's codebase without a hell of a lot stronger reason than personal preference.
|
# ? Jul 28, 2011 02:10 |
|
( Brace style wars ) True story, Allman style is Awesome-Style. And one should always use the style of the organization they're in. Not doing so isn't doing any favors to anyone.
|
# ? Jul 28, 2011 02:21 |
|
Zamujasa posted:I sympathize with you for everything you said apart from the coding-style issue. Coding style consistency is critical inside a big project for readability and maintenance purposes...Unless he is forcing some rear end-backwards coding style, I don't see a problem with your manager fixing up your code. It's actually something that you are supposed to take care of yourself...
|
# ? Jul 28, 2011 02:47 |
|
shodanjr_gr posted:Unless he is forcing some rear end-backwards coding style ...and given what else we know about him, what are the odds of that?!
|
# ? Jul 28, 2011 02:53 |
|
shodanjr_gr posted:I sympathize with you for everything you said apart from the coding-style issue. Coding style consistency is critical inside a big project for readability and maintenance purposes...Unless he is forcing some rear end-backwards coding style, I don't see a problem with your manager fixing up your code. It's actually something that you are supposed to take care of yourself...
|
# ? Jul 28, 2011 02:59 |
|
Scaevolus posted:Consistent coding style for "readability and maintenance purposes" is comical considering the developers have to work with zend-guard obfuscated code. Who wants to bet that they've actually lost the original unobfuscated source?
|
# ? Jul 28, 2011 03:39 |
|
They still have the source, they just have some severe trust issues or something, making it a pain to actually get a copy. I have a few versions' worth on my computer at work that I occasionally need to read through to figure out how poo poo works. One of the devs just today was graced with her very own copy of the main functions include file, for example. ("copy-of-bin-functions-1.36.php", and it was even encoded the first time, so he had to fix it). It was given to her so that she could read through it and learn how a function worked -- said function being a massive mess that barely "works" and will silently fail with a MySQL error if you forget how the behemoth of an "argument" works). The same occurred with the massive file holding the form builder class, too. Hell, I only found out that our "wrapper" around mysql_query had an option to not kill the page and redirect you several months into my job, because I finally got the source! I was completely guessing at those functions. In regards to the coding rewrite thing, I would have a lot less of a problem with it if it was actually a standard, or even, you know, consistent. There's a lot of code that is in the same style I use, for example, but then again there's some code that isn't. Rather than actually say anything, he'll rewrite things to meet "however he thinks it should be done", and I'll end up getting it back trying to figure out why the hell it's been changed. Just today I found something lurking in one of the update-related files that I managed to trace back to a literal copy-paste job from the php.net website circa 2001. It's so old it literally isn't even on the page any more. All he did with the function was gut the option to dump debug output and "fix" the spacing issues... without actually fixing the code, so it's still full of the exact same typos and other bizarre syntax. This will probably explain everything, but the place is run by 3 friends from school who decided to found a company. Pretty much any external idea -- even something as simple as moving and plugging in the minifridge we have sitting in the "developer room" (which is actually just an open area people are free to walk in and BS in, ruining everybody's concentration -- sales people are way too loud) required waiting 2 1/2 weeks for a meeting and getting it shot down within 10 seconds. I've suggested a lot of improvements to the code, like rewriting the toolbars to not use completely raw HTML, or making the layouts of the admin panel not 800-pixels fixed, but none of them except that last one got any traction, and even that was because someone who's been there for 3 years finally got fed up and told the super "Just let me do it now and we'll complain about the change later", more or less. Their stuff's real secure, too, but that's really for another time. I'll just say that pretty much all of the important data is more than easily accessible in public wifi if you have a basic SSH account on the server (e.g., hosting).
|
# ? Jul 28, 2011 07:03 |
|
At my last job the mish-mash of styles and conventions was so terrible that I eventually transcended past the point of ego. I would have adopted any scheme whatsoever, even if I personally hated it, so long as every loving one else did too.
|
# ? Jul 28, 2011 15:14 |
|
Zamujasa posted:Nobody worth working for would blame you for running away now. Just make sure you don't mention code formatting standards because people will assume you're just whining.
|
# ? Jul 28, 2011 16:00 |
|
Munkeymon posted:Nobody worth working for would blame you for running away now. Seriously. In your first couple posts I thought you were joking because honestly that is the stuff nightmares are made of.
|
# ? Jul 28, 2011 17:45 |
|
Code obfuscation and the whole industry thereof is a huge horror in itself. 'Lets make this poo poo unreadable by people nobody will *~ever~* figure it out, nope nope'
|
# ? Jul 28, 2011 19:06 |
|
Am I the only one who finds reading code in mixed styles not a big deal? I always use the same style for my own code, but at work we all have different styles and when I read other peoples code I have no problems at all.
|
# ? Jul 28, 2011 21:12 |
|
|
# ? May 15, 2024 16:05 |
|
Dooey posted:Am I the only one who finds reading code in mixed styles not a big deal? I always use the same style for my own code, but at work we all have different styles and when I read other peoples code I have no problems at all. The point is that people who constantly complain about formatting style are the 'spergy fucks you won't want to work with ever, so don't go complaining about it in an interview. Look at how many people jumped on that point in this thread, for instance He's got way better material, anyway.
|
# ? Jul 28, 2011 21:18 |