There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

lemmy.ml

gabe , to cat in Kitty Gang

What nefarious activities are these hooligans up to?

dullbananas , to programmerhumor in Frontend vs backend
@dullbananas@lemmy.ca avatar

The frontend developer made the backend so inefficient that it runs out of memory

CanadaPlus ,

They have this cool hack where they emulate Edge within Node.js and then run their stuff as a webpage within Edge.

Protheus , to nostupidquestions in Why do asian roads have striped curbs?
@Protheus@lemmy.world avatar

I’ve skimmed through some Singapore’s road guidelines and driver’s handbook and didn’t find any particular significance of kerb paining, from the context I inferred that striped kerb is painted that way just to be visually distinct, to be noticeable. Significant markings are made on the road alongside the kerb, like those two yellow stripes mean “no parking at all times”.

blackbirdbiryani , to nostupidquestions in Why do asian roads have striped curbs?

My guess is that it makes it easier for drivers to detect bends in the road, as the stripes are painted at equal widths, so you can visually tell in your peripheral vision when the road is starting to slope a corner.

JackGreenEarth , to nostupidquestions in Why do asian roads have striped curbs?

I saw something like that in Israel, it’s like yellow lines in the UK, it tells you where you can park.

vlad76 , to nostupidquestions in Why do asian roads have striped curbs?
@vlad76@lemmy.sdf.org avatar

I feel like a quick web search could answer that, but I’m not going to do it either.

In US curbs where you can’t park are painted bright yellow/orange, so I assume it’s something like that.

resurrexia ,

No. Singaporean here. No parking is denoted by having double lines drawn on the tarmac. I don’t know what the stripes are for.

mhz , to nostupidquestions in Why do asian roads have striped curbs?

In my country (Morocco)

  • Red/white curbs: No parking, usually found in intersection where parking could block the view from other drivers.
  • Straight continuous line by the curb: Not allowed to stop there (say for a quick errand)
  • Straight or double continuous straight lines in the middle: Not allowed to do a “U” turn. Generally, Straight lines should not be crossed.
jflorez , to programmerhumor in Tech Jobs Be Like

And then we both lie to the client

CanadaPlus ,

It’s the ciiircle of life…

PR_freak , (edited ) to programmerhumor in Frontend vs backend

Akshwallyyyy those are both presentation problems, eg frontend

Edit: to those downvoting me please tell me why a frontend dev would end up showing a raw error like that on a page

DaveNa , to programmerhumor in Frontend vs backend

Front hand back hand?

FunnyUsername , to nostupidquestions in Why do asian roads have striped curbs?
@FunnyUsername@lemmy.world avatar

It’s so you know how big the building is

…files.wordpress.com/…/gt14_k1025_p66_7209.jpg

AlmightySnoo , (edited ) to programmerhumor in optimal java experience
@AlmightySnoo@lemmy.world avatar

I know the guy meant it as a joke but in my team I see the damage “academic” OOP/UML courses do to a programmer. In a library that’s supposed to be high-performance code in C++ and does stuff like solving certain PDEs and performing heavy Monte-Carlo simulations, the guys with OOP/UML background tend to abuse dynamic polymorphism (they put on a pikachu face when you show them that there’s also static polymorphism) and write a lot of bad code with lots of indirections and many of them aren’t aware of the fact that virtual functions and dynamic_cast’s have a price and an especially ugly one if you use them at every step of your iterative algorithm. They’re usually used to garbage collectors and when they switch to C++ they become paranoiac and abuse shared_ptr’s because it gives them peace of mind as the resource will be guaranteed to be freed when it’s not needed anymore and they don’t have to care about when that is the case, they obviously ignore that under the hood there are atomics when incrementing the ref counter (I removed the shared pointers of a dev who did this in our team and our code became twice as fast). Like the guy in the screenshot I certainly wouldn’t want to have someone in my team who was molded by Java and UML diagrams.

ForegoneConclusion ,

Depends on the requirements. Writing the code in a natural and readable way should be number one.

Then you benchmark and find out what actually takes time; and then optimize from there.

At least thats my approach when working with mostly functional languages. No need obsess over the performance of something thats ran only a dozen times per second.

I do hate over engineered abstractions though. But not for performance reasons.

declination ,
@declination@programming.dev avatar

You need to me careful about benchmarking to find performance problems after the fact. You can get stuck in a local maxima where there is no particular cost center buts it’s all just slow.

If performance specifically is a goal there should probably at least be a theory of how it will be achieved and then that can be refined with benchmarks and profiling.

CanadaPlus ,

Writing the code in a natural and readable way should be number one.

I mean, even there it depends what you’re doing. A small matrix multiplication library should be fast even if it makes the code uglier. For most coders you’re right, though.

Dohnakun , (edited )

Even then you can take some effort to make it easier to parse for humans.

CanadaPlus ,

Oh, absolutely. It’s just the second most important thing.

Aceticon ,

You can add tons of explanatory comments with zero performance cost.

Also in programming in general (so, outside stuff like being a Quant) the fraction of the code made which has high performance as the top priority is miniscule (and I say this having actually designed high-performance software systems for a living) - as explained earlier by @ForegoneConclusion, you don’t optimize upfront, you optimized when you figure out it’s actually needed.

Thinking about it, if you’re designing your own small matrix multiplication library (i.e. reinventing the wheel) you’re probably failing at a software design level: as long as the licensing is compatible, it’s usually better to get something that already exists, is performance oriented and has been in use for decades than making your own (almost certainly inferior and with fresh new bugs) thing.

PS: Not a personal critical - I too still have to remind myself at times to not just reinvent that which is already there. It’s only natural for programmers to trust their own skills above whatever random people did some library and to want to program rather than spend time evaluating what’s out there.

CanadaPlus , (edited )

Thinking about it, if you’re designing your own small matrix multiplication library (i.e. reinventing the wheel)

I thought of this example because a fundamental improvement was actually made with the help of AI recently. 4x4 in specific was improved noticeably IIRC, and if you know a bit about matrix multiplication, that ripples out to large matrix algorithms.

PS: Not a personal critical

I would not actually try this unless I had a reason to think I could do better, but I come from a maths background and do have a tendency to worry about efficiency unnecessarily.

I think in most cases (matrix multiplication being probably the biggest exception) there is a way to write an algorithm that’s easy to read, especially with comments where needed, and still approaches the problem the best way. Whether it’s worth the time trying to build that is another question.

Aceticon ,

In my experience we all go through a stage at the Designed-Developer level of, having discovered things like Design Patterns, overengineering the design of the software to the point of making it near unmaintainable (for others or for ourselves 6 months down the line).

The next stage is to discover the joys of KISS and, like you described, refraining from premature optimization.

magic_lobster_party ,

I think many academic courses are stuck with old OOP theories from the 90s, while the rest of the industry have learned from its failures long time ago and moved on with more refined OOP practices. Turns out inheritance is one of the worst ways to achieve OOP.

fidodo ,

I think a lot of academic oop adds inheritance for the heck of it. Like they’re more interested in creating a tree of life for programming than they are in creating a maintainable understandable program.

einsteinx2 ,
@einsteinx2@programming.dev avatar

That’s the problem, a lot of CS professors never worked in the industry or did anything outside academia so they never learned those lessons…or the last time they did work was back in the 90s lol.

Doesn’t help that most universities don’t seem to offer “software engineering” degrees and so everyone takes “computer science” even if they don’t want to be a computer scientist.

zbecker ,
@zbecker@mastodon.zbecker.cc avatar

@einsteinx2 @magic_lobster_party

This is most definitely my experience with a lot of CS professors unfortunately.

jungle , (edited )

There’s an alternative system where this doesn’t happen: pay university professors less than a living wage.

You do that, and you’ll get professors who work in the industry (they have to) and who love teaching (why else would they teach).

I studied CS in country where public university is free and the state doesn’t fund it appropriately. Which obviously isn’t great, but I got amazing teachers with real world experience.

My son just finished CS in a country with paid and well funded university, and some of the professors were terrible teachers (I watched some of his remote classes during covid) and completely out of touch with the industry. His course on AI was all about Prolog. Not even a mention of neural networks, even while GPT3 was all the rage.

rbhfd ,

who love teaching (why else would they teach)

Professors love doing academic research. Teaching is a requirement for them, not a passion they pursue (at least not for most of them).

jungle ,

Yeah, that makes it even worse.

To be clear, I’m not advocating for not paying living wages to professors, I’m just describing the two systems I know and the results.

I don’t know how to get teachers who are up to date with industry and love teaching. You get that when teaching doesn’t pay, but it’d be nice if there was a better way.

roq ,

deleted_by_author

  • Loading...
  • magic_lobster_party ,

    OOP can be good. The problem is that in Java 101 courses it’s often taught by heavily using inheritance.

    I think inheritance is a bad representation of how stuff is actually built. Let’s say you want to build a house. With the inheritance way of thinking you’re imagining all possible types of buildings you can make. There’s houses, apartment buildings, warehouses, offices, mansions, bunkers etc.. Then you imagine how all these buildings are related to each other and start to draw a hierarchy.

    In the end you’re not really building a house. You’re just thinking about buildings as an abstract concept. You’re tasked to build a basic house, but you are dreaming about mansions instead. It’s just a curious pastime for computer science professors.

    A more direct way of building houses is to think about all the parts it’s composed of and how they interact with each other. These are the objects in an OOP system. Ideally the objects should be as independent as possible.

    This concept is called composition over inheritance.

    For example, you don’t need to understand all the internals of the toilet to use it. The toilet doesn’t need to be aware of the entire plumbing system for it to work. The plumbing system shouldn’t be designed for one particular toilet either. You should be allowed to install a new improved toilet if you so wish. As long the toilet is compatible with your plumbing system. The fridge should still work even if there’s no toilet in the house.

    If you do it right you should also be able to test the toilet individually without connecting it to a real house. Now you suddenly have a unit testable system.

    If you ever need polymorphism, you should use interfaces.

    AstralWeekends ,

    This was a nice analogy, thanks for the write-up.

    Aceticon ,

    The Design Patterns book itself (for many an OO-Bible) spends the first 70 something pages going all about general good OO programming advice, including (repeatedly emphasised) that OO design should favour delegation over inheritance.

    Personally for me (who started programming professionally in the 90s), that first part of the book is at least as important the rest of it.

    However a lot of people seemed to have learned Patterns as fad (popularized by oh-so-many people who never read a proper book about it and seem to be at the end of a long chinese-whispers chain on what those things are all about), rather than as a set of tools to use if and when it’s appropriate.

    (Ditto for Agile, where so many seem to have learned loose practices from it as recipes, without understanding their actual purpose and applicability)

    I’ll stop ranting now ;)

    wolf ,

    I fully agree about the damage done at universities. I also fully agree about the teaching professors being out of the game too long or never having been at a level which would be worth teaching to other people. A term which I heard from William Kenned first is ‘mechanical sympathy’. IMHO this is the big missing thing in modern CS education. (Ok, add to that the missing parts about proper OOP, proper functional programming and literally anything taught to CS grads but relational/automata theory and mathematics (summary: mathematics) :-P). In the end I wouldn’t trust anyone who cannot write Assembler, C and knows about Compiler Construction to write useful low level code or even tackle C++/Rust.

    Dohnakun ,

    OOP/UML courses

    Luckily, i had only one, and the crack who code-golfes in assembler did the work of us three.

    odbol ,

    That’s wild that shared ptr is so inefficient. I thought everyone was moving towards those because they were universally better. No one mentions the performance hit.

    Duralf ,

    Atomic instructions are quite slow and if they run a lot… Rust has two types of reference counted pointer for that reason. One that has atomic reference counting for multithreaded code and one non-atomic for single threaded. Reference counting is usually overkill in the first place and can be a sign that your code doesn’t have proper ownership.

    hellishharlot ,

    I have been writing code professionally for 6ish years now and have no idea what you said

    suodrazah , to programmerhumor in Frontend vs backend

    in Paris

    in Paris

    in Paris

    in Paris

    What is this bloat? Trash site.

    HiddenLayer5 OP ,

    Honestly you don’t even need to make the text field visible. If they can’t touch-type that’s on them.

    suodrazah ,

    I would prefer a dropdown list of all possible coordinate combinations.

    HiddenLayer5 OP ,

    Pfft just go there and feel the air yourself. Knowing the weather in advance is bloat anyway. If medieval sailors could launch ships without weather info and survive 30% of the time, you can too.

    suodrazah ,

    Imagine having to rely on physical senses to determine the weather, how pathetic. Honestly if you can’t infer weather patterns from learned data then better get back to that CSS.

    jdaxe ,

    Who was in Paris?

    whoisearth ,
    @whoisearth@lemmy.ca avatar

    I mean maybe B’Ellana if Tom was into some kinky shit but we aren’t talking about Voyager right now.

    suodrazah ,

    What’s a Paris?

    Darkassassin07 ,
    @Darkassassin07@lemmy.ca avatar

    Some fine gentlemen.

    BlackRose ,

    It’s meant to be used like this:

    <pre style="background-color:#ffffff;">
    <span style="color:#323232;">
    </span><span style="color:#323232;">curl localhost:8000/?city=Paris | grep Temperature >> TemperaturesOfTheWorld.log
    </span>
    
    oldfart ,

    You can see the programmer used Copilot, who in their right mind would want to type <?php echo htmlspecialchars($city); ?> four times

    noornee , to programmerhumor in Tech Jobs Be Like

    gottem lmao

    Hotdogman , to nostupidquestions in Why do asian roads have striped curbs?

    Zebra crossing

    aeternum ,

    how do the zebras know to cross there??

    Hotdogman ,

    Simple, it’s stripped black and white.

    NeoNachtwaechter ,

    They simply recognize their ancestors buried there.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lifeLocal
  • goranko
  • All magazines