Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "bem"
-
:: *joins devRant to rant about everything*
:: *everything I want to complain about is on the front page*
:: *sighs in relief*1 -
Just before you, my fellow system programmer, scroll past this, let me say this:
🍬 The web is actiually simple. 🍬
Both HTML and CSS is declarative. It's all easy when you understand the concepts, learn how to be idiomatic and quit trying to do that imperative bullshit in languages that aren't imperative.
HTML is simple. You know the boilerplate: doctype, head, body, that's all. Just mark it up and do NOT look at it before you end, mark it up as it were article or something. The appearance is up to css.
CSS is simple. You may even forget bem or rscss, you're already a skilled software developer. Use common sense and your code-splitting and naming skills you gained reading The Code Complete or doing software development for years.
Forget mockups. Forget absolute positioning, forget setting width and height in pixels. Go to awwwards, find some inspiration. Draw some buttons and fields on paper with your good old pencil. Then go and write some css. Feel free to steal some shadows and transitions from codepen.
Read about 8-pixel grid system. Let every element push away from others by setting something like margin: 16px; and whoops! You've just got fully responsive and got great vertical rhythm without even using media queries!
Oh my god, do NEVER set width and height explicitly! Type something like button { width: 120px; } and bang! The entire web page is broken. Quit that shit. Let it resize as it should. It will resize itself to fit its contents.
HTML is by default ready for your template engine. That's how you receive data from server — as server-side rendered, plain old HTML page. On the other hand, the form element is the most axiomatic and simple way to send the data to server. That's how you send it — as plain old GET or POST that every webserver can handle.
All of there are true:
1. It's easy to get great 100% responsiveness without media queries.
2. It's easy to align items in row, it's just one line of css. Maybe two, if you still want elements to wrap, but want to use flexbox:
.parent {
display: flex;
flex-wrap: wrap;
}
3. HTML and CSS are fast by default.
4. You don't need mockups to achieve great visual experience. Mockups is imperative, web is declarative.
5. You may not even need JavaScript to make great website.
Go on, ask me a question about web! I'll ready to answer everything.21 -
I am so off my game today that I accidentally rewrote the String.IfNullOrWhiteSpace extension method in C# because I forgot it existed.
My extension had a better name tho: String.IfItAintNoThang -
Best girl i've met.
I attended a CMS Conference last month(I don't use a CMS, i'm just interested with the topics about DevOps and UI/UX). I met this pretty lady ( I find her cute and awesome.) who's one of the speaker, she talked about design principles and applying it to BEM with SASS. After the talk, i asked her some questions about her dev't workflow like what tools she used and some best practices. Our conversation went well and exchange some of our knowledge and ideas also i introduced her to devrant (She's a wordpress user, i showed to her how the community hates WP, idk if she registered). After her talked we separated ways and ended seeing again after the conference as she's looking for a cab going to a mall (Same directions where i'm heading to), We talked again and decided to have dinner together. I felt like she's the best girl i met as she's into TV shows i like (Silicon Valley and Mr Robot). We added ourselves in FB and saying goodbye to each other. After a week or two, i just found out that she already into a relationship and it broke my heart.
I guess im back to the start, but i'm happy that i made a new friend.13 -
Everybody leaves me alone until I'm pseudocoding an algorithm to solve a tough problem and need to keep my train of thought. Then suddenly everybody needs me.
-
I was depressed doing a course I hated.
3 years in and I switched to Computer Science.
Best decision ever!3 -
- get better at nodejs(and a bad ass front-end dev)
- rewrite the sass to bem for my club website
- put the website for my brother and sister online
- build a new 2018 portfolio website for myself
- finish my dashboard to run on a pi
- get a permanent position1 -
So I just was invited to look at an internal issue at a company that has modified BEM styling rules for their website, because the website started looking very weird on some pages..
I instantly knew that someone had to have fucked with them, because theres no way margin--top-50 all of the sudden isn't working.
Looked at their git history and apparently a senior approved a juniors styles change, where he modified things like margin--bottom-0 to be 500px or block--float-left to be float: right in specific containers with an id like "#uw81hf_"
WHY DO YOU APPROVE THIS GARBAGE WITHOUT CHECKING IT?! AND HOW DID THIS PASS A SECOND CHECK?!!! WTF -
When someone asks me a tecnical question in something i'm interested in:
"It works like this ... Oh i also should explain you how processors work ... Anyway, when a bufferoverflow arises ... And thats how crypthography works ... and so does blockchain work ... anf thats why bitcoin is causing way too many stress on the power grid."7 -
Boss: We need you to configure our Apache Tomcat server for SSL.
Me: Okay, what version of Tomcat is installed?
Boss: 5.5.20
Me: -
The longer I work on front-end the more controversial my opinions become:
- Styling a button with display:flex is dumb.
- The DOM is not hard, unlike what the React team wants to have you believe.
- Specifying a <form> action matters, even if it's empty
- ES5 was the real JS revolution, ES6 mostly sugar-coated marketing
- Disciplined BEM (S)CSS is simple and flexible enough for most needs (vs CSS-in-JS, CSS modules)
- If editor support for Jsdoc were as advanced as Typescript, you wouldn't need the latter.
- There are cases where using floats and inline-block displays is better than the flex CSS box model12 -
I only just started learning Js. And it's going smoothly. In two weeks, I should have gone past the Beginner's level. Then what next?7
-
Just feel like going to a raised platform over my town and scream, "AHHHHHHHhhhhhhhhhhhhhhhhhh....!!!"
-
How long does it take to start writing codes without having to do “too much” looking up of some context?
I’m quite at the intermediate level and I fear I do a lot of cramming(and pouring) than actual coding.
I want to code all on my own, or at least tons of lines before having to check something up.
How do you guys do it? How do I become ‘pro’?6 -
What are you currently working on? You can be as vague as possible and let others try to figure it out.
I’m currently working on something to make pelican based blogs look a bit decent.7 -
Me: "I got the job! I write computer programs now!"
Mom: "I'm so proud of you, -bgm-. Does that mean you can come over and take a look at my computer now? The speakers, whenever I go on Facebook, they make this popping noise--"
Me: "Gotta go, ma." -
New project, make a simple change, a load of tests fail, stash changes to see if they ever passed, rerun tests: they pass ... rubbish must have been something i did. unstash changes, rerun tests to check the details: they pass ... walk away slowly
-
Inherited a massive code base today... All JS is still being accessed via global scope... what are modules & modular design even... SOLID and DRY are things that clearly never crossed the devs mind during inception of this beast... and to top it all off all there is a weird BEM / SCSS style going on that somehow manages to confuse the IDE... thus all style helper utilities in the IDE are useless...2
-
Sharing is caring, and continuing the streak, I have 3 invites to enki with the code: ASABE108
Enjoy :)4 -
"Front end developers" who don't understand the cascade are my favourite thing. Just use BEM dude, you don't need some fucking scoped components with dynamically evaluated CSS-in-JS.6
-
I did a challenge for an application which consisted of developing a landing page. I figured i wanna hardcode everything and not use any CMS or editor. Fknally i could use SCSS, ITCSS and BEM and it was the most fun i had in a long time. Going for PUG and TS next!1
-
!rant
I just found out that if you have a list of lists in C#, you can use a LINQ statement and specify indices inside the lambda instead of nested ForEaches.
This code is giving me the vapors7 -
String[] hidingPlaces = new String[1000000];
hidingPlaces[Math.rand()*1000000] = "bug";
findBug(hidingPlaces);
public int findBug(String [] are) {
// todo: return index of bug with complexity < O(1)
} -
Work email conversation with a COTS app support tech:
Tech: Could you provide me the following from Sql Server? (instructions followed)
Me: I am not the DBA, but I've sent them the request.
Tech: Could you send me the following from Sql Server while we wait? (Instructions followed)
Me: As I said, I don't have permissions to access what you want.
Tech: Oh, I see now, you most likely don't have proper access to be able to retrieve the information.
Me: ..yeah. Thanks. -
Love it when a react module doesn't allow custom class names. /s
Now I'm stuck with both BEM like classnames and long ass selectors to style the module. x_x2 -
Some people should not be allowed to write #sass, seriously having a class in BEM like notation `level1--level2-somestate`.
-
Wanted to start a little project of writing a website from scratch with a given template. No framework, just a basic thing. Apparently I've already done some work, long ago. And of course, I don't understand several parts anymore that are written. All knowledge and context gone. fuck...
At least I've realized I went for BEM css, instead of my utility css approach nowadays. Now the css has become hard to change, without accidentally breaking things. Also no git, surely because it was "just a small thing". Almost about to delete and redo. Fuck fuck fuck!1 -
Some people just cant write BEM and sass with a little bit of common sense!!! Arrrrrhhhh this shit is just so messed up!!