Jump to content

Dev Rant


zombiesbyte

Recommended Posts

As a developer I get annoyed at how the obvious issues are never addressed. I'd fix them myself but this isn't as simple as 'forking' haha.. let me explain (and vent)

HTML IMG tag

Yes, it's been with us for quite some time, provided us with the ability to decorate our websites and now even provides us with SVG embedding. but I feel like there's a great miss-understanding when it comes to the tag for how we have just left it in it's raw unchanged state and then demanded that it stays in this state for good programming practice. I am of course referring to the attributes of width and height.

Early HTML was all about, well the HTML but the focus of structure and style has been separated to HTML handling structure and CSS handling style (in general). With the width and height attributes being insisted puts me in a state of confusion as I write my width and height in my CSS. For responsive design to be at the heart of 99% of everything it seems, it is quite impossible to add a width and height as it would be unknown. So maybe it's the actual width and height of the image that needs specified which still doesn't explain the necessity of such attributes as the information is irrelevant to any browser since the style in CSS is applied as a dominant setting. Even if CSS hadn't addressed the image size the browser has the information at it's disposal even before the entire file has been downloaded and at worse case this is naturally extended from a small block area.

Other attributes confuse me too as the alt was originally an alternative text placeholder in case the image hadn't loaded but most browsers decided to use this information as a title attribute. The title attribute was supposed to be the only snippet that appeared on interaction (i.e. hover-over). There was some accessibility attributes that seem to have disappeared which allowed for full descriptions of images so that screen-readers and alike could use them, from memory I think one was "longdesc=". IMG tag in my opinion should be a simple tag that offers no width and height but provides an alt (but not a title since browsers seems to use these interchangeably).

XHTML Vs HTML

I learnt a long time ago about the differences of XHTML over HTML and I still see people putting XHTML/XML style into HTML documents and the strange thing is they can't explain why when challenged. CC hasn't got any so I'm at peace here :)

 

CSS

I'm not going to go into too much detail here as this one is obvious:

border-width: 2px;
border-style: solid;
border-color: #000000;

background-size: cover;
background-image: url('myimage.jpg');
background-color: #000000;

font-size: 12pt;
font-style: italic;
font-color: #000000;

 

PHP

Again this is another obvious one which has me confused, did they not stop to check the ordering:

in_array( {needle}, {haystack} );

strstr( {haystack}, {needle} );

strpos( {haystack}, {needle} );

I know that there's lots of chatter about this one but I'm referring to the official php manual analogy of needle and haystacks and find the reason why they have done it this way isn't as easy as finding a "haystack in a needle" I'm not even sure that they stick to string functions and array functions using these orders either but I can't remember which one breaks this system.

 

Final thoughts

This was all intended to be light hearted and although it does put my OCD on the boil at times I don't spend too long sharpening my knives at these inconsistencies... I hope you had fun laughing at my pain

:nerves::34::w00t:

Link to comment
Share on other sites

There's always the state of confusion when it comes to variable name and the thin line of making_them_readable (or makingThemReadable) and understandable. I used to adopt the underscore seperation route but found that does add the additional length and since using lowerCamelCase it has helped as it usually forces length restriction. But yes I think we've all hadOneOfThoseCrazyLengthVariablesThatYouJustWantToMakeSureYouKnowWhatItDoes.

As for the spelling.. there's tons of spelling mistakes in the language anyway so why worry. Color for one haha although logically I favour the American spelling as I tend not to pronounce "colour" with marbles in my mouth. I don't think the English language has any power to demand consistency or accuracy as it's full of them itself so all's forgiven as far's I'm concerned (notice my forced abbreviation there!). ;)

 

 

Link to comment
Share on other sites

43 minutes ago, zombiesbyte said:

There's always the state of confusion when it comes to variable name and the thin line of making_them_readable (or makingThemReadable) and understandable. I used to adopt the underscore seperation route but found that does add the additional length and since using lowerCamelCase it has helped as it usually forces length restriction. But yes I think we've all hadOneOfThoseCrazyLengthVariablesThatYouJustWantToMakeSureYouKnowWhatItDoes.

As for the spelling.. there's tons of spelling mistakes in the language anyway so why worry. Color for one haha although logically I favour the American spelling as I tend not to pronounce "colour" with marbles in my mouth. I don't think the English language has any power to demand consistency or accuracy as it's full of them itself so all's forgiven as far's I'm concerned (notice my forced abbreviation there!). ;)

 

 

Haha. Good. I't not a fan of the spelling and grammar police!

 

Link to comment
Share on other sites

haha " I't " that's like wheels within wheels, nice one :D

Always makes me laugh when I think about how the word "okay" has been shortened...

English word: "Okay"

20th Century : "OK"

21st Century: "k"

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...