Look 0 of my work involves HTML, well maybe 1-2 percent does; however, about 60% of my work involves regular expressions, grammar, lexical scanning and syntactic parsing, so it still irks me, and will irk me beyond my grave, when people say shit like 'Don't parse HTML/Markdown/etc with regex! Use a parser generator!'...
I'm confused. To me, "building a tree" and "parsing" are the same thing. If you end up with a tree representation of the structure of your document, the thing you did to get there is parsing.
On the one side I really like c and c++ because they’re fun and have great performance; they don’t feel like your fighting the language and let me feel sort of creative in the way I do things(compared with something like Rust or Swift)....
Rust does memory-safety in the most manual way possible, by requiring the programmer prove to the compiler that the code is memory-safe. This allows memory-safety with no runtime overhead, but makes the language comparatively difficult to learn and use.
Garbage-collected compiled languages — including Java, Go, Kotlin, Haskell, or Common Lisp — can provide memory-safety while putting the extra work on the runtime rather than on the programmer. This can impose a small performance penalty but typically makes for a language that's much easier on the programmer.
And, of course, in many cases the raw performance of a native-code compiled language is not necessary, and a bytecode interpreter like Python is just fine.
Find the pessimists in your organization, and disappoint them.
Make mean cynicism a part of your workplace culture. Do this by example: Promote mean cynics and put them in charge of things. But do it also by conversion: Behave in a way that makes mean cynics' view of the world correct.
Reward bad personal habits to create internal conflicts between work and health.
If someone skips sleep to finish a project, give them a bonus. This gives them an internal conflict between approval and health, and teaches them that they can sacrifice their health to receive a reward.
Encourage a hard-drinking culture in teams that have stressful roles that demand team cohesion, like SRE or Ops teams with on-call requirements. This gives them an internal conflict between their support network and health.
If someone is sick, injured, bereaved, or otherwise suffering: Make it clear how much their condition is inconvenient to their coworkers, and how much their projects are impacted by their absence. Assure them that all will be well once they can conclude their personal problems and commit to the team. Do not, however, offer them any specific help; if they express specific needs for accommodation, disregard them as idle and unrealistic wishes.
Pulsar (former Atom) is still the best code editor in my opinion. It is easiest and fastest to use, has all the nice productivity boosting plugins and is overall great for all the same reasons the Atom was great. 🚀...
Any time you're turning a string of input into something else, what you are doing is parsing.
Even if the word "parser" never appears in your code, the act of interpreting a string as structured data is parsing, and the code that does parsing is a parser.
Programmers write parsers quite a lot, and many of the parsers they write are ad-hoc, ill-specified, bug-ridden, and can't tell you why your input didn't parse right.
Writing a parser without realizing you're writing a parser, usually leads to writing a bad parser. Bad parsers do things like accepting malformed input that causes security holes. When bad parsers do reject malformed input, they rarely emit useful error messages about why it's malformed. Bad parsers are often written using regex and duct tape.
Try not to write bad parsers. If you need to parse something, consider writing a grammar and using a parser library. (If you're very ambitious, try a parser combinator library.) But at least try to recall something about parsers you learned once way back in a CS class, before throwing regex at the problem and calling it a day.
(And now the word "parser" no longer makes sense, because of semantic satiation.)
By the way, please don't write regex to try to validate email addresses. Seriously. There are libraries for that; some of them are even good. When people write their own regex to match email addresses, they do things like forget that the hyphen is a valid character in domain names.
The only way to correctly validate an email address is to send a message to it, and verify that it arrived.
If you're accepting email addresses as user input (e.g. from a web form), it might be nice to check that what's to the right of the rightmost @ sign is a domain name with an MX or A record. That way, if a user enters a typo'd address, you have some chance of telling them that instead of handing an email to user#example.net or user@gmailc.om to your MTA.
But the validity of the local-part (left of the rightmost @) is up to the receiving server.
If DNS is transiently down, the most common mail domains are still in local resolver cache. And if you're parsing live user requests, that means the IP network itself is not in transient failure at the moment. So it takes a pretty narrow kind of failure to trigger a problem... And the outcome is the app tells the user to recheck their email address, they do, and they retry and it works.
If DNS is having a worse problem, it's probably down for your mail server too, which means an email would at least sit in the outbound mail spool for a bit until DNS comes back. Meanwhile the user is wondering where their confirmation email is, because people expect email delivery in seconds these days.
So yeah ... yay, tradeoffs!
(Confirmation emails are still important for closed-loop opt-in, to make sure the user isn't signing someone else up for your marketing department's spam, though.)
I started fairly recently (probably somewhere between nine and seven years ago; time isn’t my strong suit, cut me some slack) on Debian. Now I’m on Arch Linux.
1993 or so, before kernel 1.0. Slackware on floppies, then Debian, then Ubuntu, then Mint, now Pop!_OS.
I got a rather profitable career out of it: went into IT during/after college, then got hired into a big Silicon Valley company, stayed in that area for several years, then quit during COVID.
It kind of makes me think of how odd it would have been if many of the old forums named themselves like bookclub.phpbulletin.com, metalheads.vbulletin.net, or something....
I’m trying to learn programming and something I struggle with the most is trying to separate code mentally into chunks where I can think through the problem. I’m not really sure how to describe it other than when I read a function to determine what it does then go to the next part of the code I’ve already forgotten how the...
Difficult concepts are made of simple parts. Find the parts. Find ways to play with them.
Example: TCP/IP performance is complicated, but you can look at specific parts of it like packet latency, retransmission behavior, and the various timeouts. Eventually you understand the “gears” of the system well enough that it’s obvious that if the minimum retransmission timeout is 100msec, that a single packet loss means your whole transaction cannot possibly have <100msec latency.
To give some context, I’m a developer myself and once I had a conversation with someone who has not “tasted” programming, but was wondering about passion and career. I was asked what I like about programming. My answer was that my interest in it came from writing small scripts when I was young to automate things....
This is not an ad BTW, I literally stumbled upon it a few minutes ago. From what I can gather, however, this is a [DIY-ish] search engine that solely searches on text (no other forms of media, such as, … idk hypertext maybe), which allows users to have more control over queries (like including and excluding terms). I suppose...
I’m refurbishing an old PC to work as a home server for several stuff. I’m looking for a lightweight distribution to install in it, but with a decent package repository. A small image size will be appreciated, as I have slow bandwidth too.
I prefer good faith discussions please. I love the Fediverse and love what it can be long term. The problem is that parts of the culture want nothing to do with financial aspect. Many are opposed to ads, memberships, sponsorships etc The “small instances” response does nothing to positively contribute to the conversation....
The “financial aspect” is much smaller than you seem to think.
It is not that expensive to run a server, and there are lots of people willing to contribute. You can look at the previously posted expenses and donations information from the lemmy.world admins.
You might be telling yourself these things are difficult and expensive because you don’t know, and precaution leads you to overestimate the actual costs and difficulty. That is fine when you’re making choices for yourself, but it reliably produces incorrect results if you try to apply it to the world at large. In reality, there are lots of people out here who know how to run Internet services; and some of them have set this one up pretty well.
I’d suggest the “complex internal politics, manager layers, architects” – and the fancy offices, cafeterias, and other amenities – are actually quite a lot more expensive than the developers.
But don’t underestimate ads, and things that are similar to ads. In competitive markets, ads are really expensive, because ads are rivalrous. Venture A has to outbid Venture B for ad placement. The same sort of logic goes for hiring, especially hiring of trend-driven fields like project management. (“I’m a Scrum Master, who are you, a scum master?”)
One note: It’s pretty rare for tech companies to directly issue profits to shareholders (i.e. as dividends). Rather, profits are usually reinvested into expanding the company; and shareholders make money by selling shares that have risen in value.
Maybe Facebook has bigger problems because they’re so huge; like being a bigger target for attack by hate groups.
Maybe they just really like their fancy offices and cafeterias.
Maybe it’s just better for the world if online speech is diversified over lots of small services instead of one monopoly service; and this is reflected in the way the world actually behaves towards these different services.
Large companies don’t innovate anymore, they acquire and Google’s sourceforge offering is… let’s call it underwhelming. If they tried to compete with Github and threw money into Gitlab, what do you think they’d do?
Hello Pop Os. I have installed the latest plasma desktop, and now the numberpad on my keyboard does not work (I have toggled keypad lock on an off). I have tried several keyboards an they all have the same problem . The same keyboards I have used on my linux mint and my debian computers
Sometimes I report a bug & the dev starts off asking for more details. But then there’s a kind of scope of effort creep where you start to realize you’re being tricked into finding where in the code the problem is so you can fix the bug....
If you’re not paying that engineer, you have no good reason to form opinions about “where they belong” in terms of work they do that might benefit you.
You can explore a GUI if it’s safe to do so. If a user has been burned by easily putting their system into an unrecoverable state, they develop a fear of exploring. “I don’t want to change anything; I might break my computer / lose all my work / get a virus!” is a really common fear.
If you’re modeling relational data, it doesn’t seem like you can get around using a DB that uses SQL, which to me is the worst: most programmers aren’t DB experts and the SQL they output is quite often terrible....
One alternative to both raw SQL and and ORM is a query builder, a procedural library for constructing database queries. Query builders typically don’t have the object/relational “impedance mismatch” of ORMs; they don’t encourage you to pretend that records in the database are the same as objects in your code. But they give you a syntax that looks more like your programming language, and automatically handles escaping (and thus, resistance to injection attacks).
However, query builders often don’t expose all the power of your database. If you’re using PostgreSQL, you’ve got one hell of a powerful set of tools in there. It’s often worth spending the time to master them just so you don’t end up reinventing the stone-age wheel on top of a warp-speed hovercraft.
To be clear, I’m not complaining that we don’t have these aforementioned applications on the Linux desktop. That’s not the point. The point is “we” still don’t have a robust way for developers to monetise their application development work....
Say you want to contribute to a project and find out the only way to do so is by discussing the issue on IRC or the mailing list, then submitting the patch per email.
One issue with IRC is that there’s no archiving by default. That means discussions and context for decisions are lost. This can be fixed, though. But the default setup for social chat isn’t optimal for project planning.
“Open source” in the sense this article uses is not really the same as “open source software” which is what this forum is about. Open source journalism does not refer to copyright license terms.
The more ritual and incense-waving you wrap around your work, the more likely it is that someone is going to spend all their time on ritual and incense-waving and none on actually creating value.
Fascists aren’t morally healthy humans. Authoritarians can’t cope with social reality, where different people can have different opinions and loyalties and yet support each other. They always seem to end up succumbing to patriarchal cults, where Lenin-Hitler-Mao-Trump gets to do whatever he wants to your sons and your daughters, and you and your working class have no recourse.
The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the set of communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the suite are the Transmission Control Protocol (TCP), the User Datagram Protocol (UDP), and the Internet Protocol (IP).
For that matter, the classic networking text by Douglas Comer is Internetworking with TCP/IP and it does cover UDP, ICMP, ARP, DHCP, DNS, etc.
There was a post asking people their opinions about Edge and many people seemed to liked the idea of Edge and seemed to be ok having it on Linux (Blasphemy)...
KoboldAI has an “KoboldGPT” mode, which is for answering questions. You can try it at lite.koboldai.net or run it on your own.
Here’s an example conversation I just had with it (emoji icons added):
🤖 Hello, I am KoboldGPT, your personal AI assistant. What would you like to know?
🧑 What is the name of the original version of the game Monopoly?
🤖 The original version of the game Monopoly is called “The Landlord’s Game.” It was created by Elizabeth Magie in the early 20th century. However, the most well-known version of Monopoly today is based on a variant called “Monopoly” that was designed by Charles Darrow in 1935.
🧑 Did “The Landlord’s Game” have any purpose besides being a board game?
🤖 Yes, “The Landlord’s Game” had a specific purpose beyond being a board game. Elizabeth Magie created it as a way to illustrate the negative aspects of concentrating land in private monopolies. She believed that it could be used as a tool for teaching economic concepts such as rent, taxes, and the distribution of wealth.
🧑 What economic ideology was associated with this game?
🤖 Elizabeth Magie was influenced by Henry George’s philosophy of Georgism. Georgists believe that land should belong to all people equally, and that taxation should be based on the value of land rather than on income or production.
[Thread, post or comment was deleted by the author]
A Google spokesperson told Motherboard in a statement at the time of the unionization that it had “no objection to these Cognizant workers electing to form a union,” but that it would not bargain with them. “We are not a joint employer as we simply do not control their employment terms or working conditions—this matter is between the workers and their employer, Cognizant,” the spokesperson said.
NLRB seems to disagree. This will be an interesting case, I suspect …
I used Plex for my home media for almost a year, then it stopped playing nice for reasons I gave up on diagnosing. While looking at alternatives, I found Jellyfin which is much more responsive, IMO, and the UI is much nicer as well....
I AM SO DISAPPOINTED WITH UBUNTU 24.04 😡 ( news.itsfoss.com )
Which communication protocol or open standard in software do you wish was more common or used more?
Whether you're really passionate about RPC, MQTT, Matrix or wayland, tell us more about the protocols or open standards you have strong opinions on!
'Don't parse markup languages with Regex' is an annoying trollpost and it should die... right?
Look 0 of my work involves HTML, well maybe 1-2 percent does; however, about 60% of my work involves regular expressions, grammar, lexical scanning and syntactic parsing, so it still irks me, and will irk me beyond my grave, when people say shit like 'Don't parse HTML/Markdown/etc with regex! Use a parser generator!'...
White House: Future Software Should Be Memory Safe ( www.whitehouse.gov )
On the one side I really like c and c++ because they’re fun and have great performance; they don’t feel like your fighting the language and let me feel sort of creative in the way I do things(compared with something like Rust or Swift)....
How to be a -10x Engineer ( taylor.town )
Pulsar, the best code editor ( optimizedbyotto.com )
Pulsar (former Atom) is still the best code editor in my opinion. It is easiest and fastest to use, has all the nice productivity boosting plugins and is overall great for all the same reasons the Atom was great. 🚀...
Strings do too many things ( buttondown.email )
Sony is erasing digital libraries that were supposed to be accessible “forever” ( arstechnica.com )
Where, and when, did you start using Linux? Where are you now?
I started fairly recently (probably somewhere between nine and seven years ago; time isn’t my strong suit, cut me some slack) on Debian. Now I’m on Arch Linux.
Top 50 defederated instances ( lemmy.basedcount.com )
Why do a lot of fediverse instances put their software (i.e. Lemmy/Mastodon) in their name somehow?
It kind of makes me think of how odd it would have been if many of the old forums named themselves like bookclub.phpbulletin.com, metalheads.vbulletin.net, or something....
As a beginner, how should I go about learning difficult concepts?
I’m trying to learn programming and something I struggle with the most is trying to separate code mentally into chunks where I can think through the problem. I’m not really sure how to describe it other than when I read a function to determine what it does then go to the next part of the code I’ve already forgotten how the...
What got you into coding ? (aside from money)
To give some context, I’m a developer myself and once I had a conversation with someone who has not “tasted” programming, but was wondering about passion and career. I was asked what I like about programming. My answer was that my interest in it came from writing small scripts when I was young to automate things....
Has anyone checked out marginalia search? ( search.marginalia.nu )
This is not an ad BTW, I literally stumbled upon it a few minutes ago. From what I can gather, however, this is a [DIY-ish] search engine that solely searches on text (no other forms of media, such as, … idk hypertext maybe), which allows users to have more control over queries (like including and excluding terms). I suppose...
Lightweight distro for home server?
I’m refurbishing an old PC to work as a home server for several stuff. I’m looking for a lightweight distribution to install in it, but with a decent package repository. A small image size will be appreciated, as I have slow bandwidth too.
Fediverse sustainability
I prefer good faith discussions please. I love the Fediverse and love what it can be long term. The problem is that parts of the culture want nothing to do with financial aspect. Many are opposed to ads, memberships, sponsorships etc The “small instances” response does nothing to positively contribute to the conversation....
Which is better: Linux or GNU/Linux ( lemmy.dbzer0.com )
Would the world be a better place if Google bought Gitlab?
Large companies don’t innovate anymore, they acquire and Google’s sourceforge offering is… let’s call it underwhelming. If they tried to compete with Github and threw money into Gitlab, what do you think they’d do?
AI scam calls imitating familiar voices are a growing problem – here's how they work ( theconversation.com )
Wired has retracted its article "How Google alters search queries" ( www.wired.com )
It looks like the ex-DDG employee got the details wrong, and read the slides backwards.
Keyboard problems
Hello Pop Os. I have installed the latest plasma desktop, and now the numberpad on my keyboard does not work (I have toggled keypad lock on an off). I have tried several keyboards an they all have the same problem . The same keyboards I have used on my linux mint and my debian computers
Watch out for devs trying trick bug reporters into doing work
Sometimes I report a bug & the dev starts off asking for more details. But then there’s a kind of scope of effort creep where you start to realize you’re being tricked into finding where in the code the problem is so you can fix the bug....
Microsoft causes learned helplessness ( lemmy.sdf.org )
Is there something better than SQL?
If you’re modeling relational data, it doesn’t seem like you can get around using a DB that uses SQL, which to me is the worst: most programmers aren’t DB experts and the SQL they output is quite often terrible....
New 'Looney Tunables' Linux bug gives root on major distros ( www.bleepingcomputer.com )
From BeepingComputer.
Linux distros need to take more responsibility for security - InfoWorld ( www.infoworld.com )
From Solarpunk to Fedipunk - fueling a saturated movement with new energy ( lemmy.world )
What do you think of this? Do you think it is a good idea and could take off?
There is still no Linux app store ( popey.com )
To be clear, I’m not complaining that we don’t have these aforementioned applications on the Linux desktop. That’s not the point. The point is “we” still don’t have a robust way for developers to monetise their application development work....
What do y'all think about mailing lists and IRC as sole communication channels?
Say you want to contribute to a project and find out the only way to do so is by discussing the issue on IRC or the mailing list, then submitting the patch per email.
Notes from the Digital Field: Ethical Dilemmas in Open Source Research - bellingcat ( www.bellingcat.com )
Weaknesses of agile and Scrum ( b.agilob.net )
A quick rant about weaknesses of agile
Is lemmy.ml turn into authoritarian?
I just realised, I can’t post anything on lemmy.ml...
Tell Congress: Don't Allow The Return Of The Worst Patents ( act.eff.org )
What is FOSS answer to BingGPT & Google Bard?
There was a post asking people their opinions about Edge and many people seemed to liked the idea of Edge and seemed to be ok having it on Linux (Blasphemy)...
[Thread, post or comment was deleted by the author]
Google Flat-Out Refuses to Bargain With Workers, Prompting YouTube Music Strike ( www.vice.com )
What are some FOSS programs that you think are a far better user experience than their counterparts? ( sh.itjust.works )
I used Plex for my home media for almost a year, then it stopped playing nice for reasons I gave up on diagnosing. While looking at alternatives, I found Jellyfin which is much more responsive, IMO, and the UI is much nicer as well....