HackerTrans
TopNewTrendsCommentsPastAskShowJobs

hamedb

no profile record

Submissions

Show HN: Style CSS Visually

intab.io
4 points·by hamedb·4 tahun yang lalu·1 comments

Show HN: DevBox – I curated 84 high-quality webdev tools to use in 2022

intab.io
4 points·by hamedb·4 tahun yang lalu·1 comments

Show HN: TurboKit – fast static template that scores 100 in Lighthouse

hamedbaatour.gumroad.com
4 points·by hamedb·4 tahun yang lalu·3 comments

Ask HN: What code do you consider as clean code?

5 points·by hamedb·4 tahun yang lalu·15 comments

comments

hamedb
·4 tahun yang lalu·discuss
would love to hear your feedback! thoughts?
hamedb
·4 tahun yang lalu·discuss
Glad you found this useful. If you have any performance optimization questions feel free to ask :)
hamedb
·4 tahun yang lalu·discuss
let me know what are your top picks of webdev tools and resources coming into 2022?
hamedb
·4 tahun yang lalu·discuss
will take a look.

but it seems it focuses a lot on TTD/unit testing and integration testing not my thing.

I hate testing and never understood why they created this most complex todo list in the first place?

just write what you are going to do it and don't worry no need to check everyday if the code still exist or not.

why run an automated check every single day of the same code. not to mention the time wasted on mocking and creating fake data.

sorry a bit off topic but I really hate tests! would need to understand why some still defend TTD...
hamedb
·4 tahun yang lalu·discuss
oh thanks for giving a great example definitely well written code. been reading this https://github.com/apache/guacamole-client/blob/master/guaca...

don't you find that comments are taking a lot of space more than the actual code or do you think this is what a takes to avoid confusion. I found that single line comments are much better, compact and enough to explain what is happening as opposed to those multiline comments that take so much space.
hamedb
·4 tahun yang lalu·discuss
this build process took a lot of work to make and polish...would love to hear your feedback guys!
hamedb
·4 tahun yang lalu·discuss
yeah everything agrees on the necessity to chose meaningful/short/descriptive/concise names.

but I was asking if there's anything to keep in mind when building large complex code.

- how long or short are your functions?

- what do you comment?

- can you actually use only pure functions?

- how large are your files?

- how do you manage 3rd party dependences or do you don't use any?

- how do you mange bundle size and enforces code quality?

- when to break a function or break a file into smaller parts?

- do you create functions that call only other functions or each function should have some procedural code?

giving code examples of a well written code snippet would be so helpful!
hamedb
·4 tahun yang lalu·discuss
for the "common basis" part I'm referring to commenting code/ using descriptive variable names/ breaking mega large files into smaller ones...

things that developer do not agree on include choosing between (object-oriented, procedural or functional code)

the debate of isolating small bits of code regardless of the paradigm used. how many "code components" can be created without making the follow references game so crazy that you can't even understand the code flow and where you even started reading the code. are small code duplicates really that bad or over componentizing is a bigger issue that tries to solve the first one?

things like that...

I didn't work for large company before so was wondering if you saw any consensus/ agreement patterns between senior developers in these type of debatable things especially when writing JS because of it's huge flexibility.
hamedb
·5 tahun yang lalu·discuss
it's more like a CSS reset file than a framework. in that case I don't see adding 4kb is necessary. I'm more a fan from styling everything from scratch rather than using any CSS framework.

we just need better tooling to write better CSS faster not necessarily including prewritten CSS.

I deeply believe this is where CSS going and this why I'm building https://intab.io to push towards that direction myself.
hamedb
·5 tahun yang lalu·discuss
the title is a bit clickbaty, it should be written as: where to use margins when building web components. you are just saying that you have to place margin in the container of the component not inside it. that's it!

Anyways, I think the answer is "it depends" and there's no silver bullet when it comes to micro CSS details.

CSS is always controversial when it comes to how structure it and I don't think this type conversations are useful or add anything to front end. it's just a waste of time as the end result only matters.

we can argue for days to both sides on where to place margins and we will never find the "perfect" way.

I am a big believer front end developers will move to low code tools for CSS such as https://intab.io to style their CSS in the near future and focus more on the end result rather than waste time arguing on this micro details. take a way, focus on the end result rather than these trivial things!