560 blogs tracked7,114 posts indexed

Line

We track 25 posts about Line from 13 engineering blogs. Most active: The Daily WTF, Real Python, Oona Räisänen. Latest post: Nov 18, 2026.

Raw tag behind this topic:line

Companies writing about Line

Recent posts

  • Representative Line: Terning White as a (Style)Sheet (opens on the source site)

    The Daily WTF ·

    Years ago, Stefan's company was short handed, especially on the developer team. But they had a large hell-desk support team. And at some point, someone had the genius idea: "PHP is easy for anyone to learn, and so our helpdesk folks should have no problem. Let's hand them development tasks." Which meant Stefan inherited lots of lines which look like this: $bgc = $tno ? '#FFFFFF' : '#FFFFFF'; Unlike many examples of this pattern, this is not the result of a pre-processing or templating step generating a conditional where both branches are the same value. Someone actually typed this. Also,…

  • Windows Kiosks and Command Line Tools, Built From Java (opens on the source site)

    CodeName One ·

    Locked down kiosks on Windows IoT Enterprise, deployed over SSH, and command line tools with real terminal UIs that compile to a native executable with no JVM.

  • CodeSOD: Building a Line (opens on the source site)

    The Daily WTF ·

    There's an unofficial category of posts here that I call "Somebody told us string builders were more efficient, so we always use string builders, regardless of whether or not that actually makes sense," or STUSBWMESWAUSBROWONTAMS, for short. Probably should workshop that name some. In any case, Adam sends us a new entry for that collection: Public Function ReadFromFile(ByVal filename As String) As String Dim sb As StringBuilder = New StringBuilder() Dim str As String = String.Empty Using sr As StreamReader = File.OpenText(filename) str = sr.ReadToEnd() sb.Append(str & Constants.vbLf) End…

  • We can do better than line-buffered output (opens on the source site)

    Chris Wellons ·

    Buffered output typically comes in two flavors: fully buffered and line buffered. If output goes to a terminal then the implementation automatically selects line buffering, flushing its buffer when a line is completed so that it reaches the user immediately. Otherwise it fully buffers, holding output until the buffer is full or an explicit flush event at some arbitrary point in the future. Line buffering is a common bottleneck in non-interactive terminal applications such that it’s worth redirecting output to a file or pipe in order to avoid it. It doesn’t have to be this way. We can have our…

  • Representative Line: What it Doesn't Do (opens on the source site)

    The Daily WTF ·

    Alastair found this comment in his codebase, and wondered, "who wrote this comment?" A quick blame answered the question: he did. He did not, however, write the code. public function getAllMailers() { // This function neither returns Mailers, nor all of them. ... } I suppose the comment was easier to add that doing a global find/replace to update the function name everywhere. But I do wonder, what does this function return? In any case, sing along: "I wrote the comment, but I did not pick this function name". [Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with…

  • Build Command-Line Interfaces With Python's argparse (opens on the source site)

    Real Python ·

    When building Python command-line interfaces (CLI), Python’s argparse module offers a comprehensive solution. You can use argparse to create user-friendly command-line interfaces that parse arguments and options directly from the command line. This tutorial guides you through organizing CLI projects, adding arguments and options, and customizing your CLI’s behavior with argparse. You’ll also learn about setting up command-line argument parsers, parsing arguments, and implementing advanced features like subcommands and mutually exclusive argument groups. By understanding how argparse handles…

  • Representative Line: Readable Formats (opens on the source site)

    The Daily WTF ·

    We all love format strings for generating human readable text. Certainly, they're a better choice than string concatenation. Even if I have a blind spot that keeps me from remembering the printf format tokens, I still prefer to use format strings. Jasmine has a co-worker that does use format strings, but they also miss using string concatenation. So they've found a way to combine them, and avoid the perils of making readable code that describes the format of their text. myField.DataFormatString = "{0:#,##0." + new string('0', 2) + ";(#,##0." + new string('0', 2) + ")}"; Now, in their defense,…

  • The Frist Line of Defense (opens on the source site)

    The Daily WTF ·

    We don't cover a lot of security issues here, simply because they're not usually funny. But sometimes, they are. So here's a quick hit about some recent ones. We start with a very bad month for the Danish social security system, the Central Register of Persons (CPR). Last week, they detected a breach which exposed the personal details of 8.8m people. Per the Register article, a cybersecurity specialist correctly pointed out that treating your ID number as if it were a secret was a terrible idea in the first place, but unfortunately, so many systems have grown up around the idea that full…

  • Representative Line: A Diamond in the Rough (opens on the source site)

    The Daily WTF ·

    Mandy's co-worker recently learned about virtual inheritance in C++. It's become their new favorite button to push, and they only use virtual inheritance. Virtual inheritance is one workaround for the "diamond problem", where you have an inheritance tree that "recombines" via multiple inheritance: when a child class has a Hapsburg-esque parentage, it's hard to decide which inherited methods are being invoked or overridden. In C++, imagine you have class A, which gets derived into classes B and C. Class D then uses multiple inheritance to inherit from B and C. In practice, this means that D…

  • Quiz: How to Launch an HTTP Server in One Line of Python Code (opens on the source site)

    Real Python ·

    In this quiz, you’ll test your understanding of How to Launch an HTTP Server in One Line of Python Code. By working through this quiz, you’ll revisit how to start Python’s http.server from the command line, bind it to an address and port, and choose which directory it shares. You’ll also check your knowledge of running CGI scripts, building a handler on top of BaseHTTPRequestHandler, serving over HTTPS, and knowing when to keep this server out of production. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click…

  • Representative Line: Unique Testing (opens on the source site)

    The Daily WTF ·

    Nikolai M's team had a flaky CI/CD build. About 0.5% of the time, one of their tests would fail: frequent enough to be annoying, but not so frequent that it motivated management to assign anybody to investigate. Nikolai eventually dug in, taking the initiative. Microsoft's implementation of UUIDs calls them GUIDs. The GUID is, per the docs, really just a wrapper around UUID algorithms, and supports a variety of different UUID variants. I'm sure at some historical point, this wasnt't true, and Microsoft had some weird internal algorithm. That's not really here nor there, but the test that was…

  • CodeSOD: Extremely One Line (opens on the source site)

    The Daily WTF ·

    Autoformatting your code is a standard thing to do these days. And in those days past, if we're being honest. There's no excuse to not use some kind of autoformatter. Whether you configure your editor to do it or are a weirdo like me who runs a formatter from the CLI as a build step, you've got an easy way to format your code so it looks neat and readable. And some IDEs, like Visual Studio, are pretty insistent about doing this for you. Which makes today's code sample a bit more perplexing. This comes from an ancient ASP .Net application that Austin has the misfortune to work with: protected…

  • 121+ Cyber Monday email subject line examples in 2026 (opens on the source site)

    Twilio ·

    Find hundreds of Cyber Monday email subject lines with templates and examples to inspire your email campaigns this shopping season.

  • Representative Line: So Much Room (opens on the source site)

    The Daily WTF ·

    Today's representative comment ran out of room. int maxLen = getColumnSize(session, "audit", "text_value1") - 16; // Leave some room for No, it isn't continued on the next line and just got trimmed out, except perhaps by a careless merge. This is the entire comment. Clearly, written by David Chase, the creator of "The Sopranos". There are so many things we might be leaving room for. We could leave some room for dessert. Leave some room for activities. Leave some room for the holy spirit. Leave some room for improvisation. [Advertisement] ProGet’s got you covered with security and access…

  • Quiz: Rock, Paper, Scissors With Python: A Command Line Game (opens on the source site)

    Real Python ·

    Check your understanding of building a command line rock paper scissors game in Python, from player input and loops to enums and dictionary rules.

  • Representative Line: Both Ways Bug Me (opens on the source site)

    The Daily WTF ·

    There are many cases where some sort of debugging block sneaks by, especially cases where we see preprocessors or templates working, which leave us with nonsense like if (true == false) running in production. But Codemonkey found a new twist on that sort of thing, in a SQL query being run in production. WHERE (some conditions) AND (1 = 0 OR (1 = 1 AND (other conditions))) The OR means that by twiddling the first equality check, we can toggle "always return rows" with "return based on condition". Toggling the second we can make it "never return rows", which I'm not certain is actually useful.…

  • Representative Line: We All Register This (opens on the source site)

    The Daily WTF ·

    Today's maybe more of a "representative data sheet entry" than anything else. Every developer has the experience of reading the documentation. If you've been at this for some time, you've probably read bad documentation. Documentation that is incomplete, inaccurate, or otherwise flawed. Or, my personal favorite, the brief time where Oracle tried to put all of its documentation into an Adobe Flex site (aka, a Flash application, not a real web app). That one had fun bonus features, like "breaking copy and paste" and "preventing you from deep linking to a piece of the documentation". But…

  • One line of Python, and a 3× drop in p99 (opens on the source site)

    Soundcloud ·

    We removed one log statement from a service’s hot path this week. Its 99th-percentile response latency fell from a steady to , and CPU…

  • Opening Sublime Text from the command line (opens on the source site)

    Rob Allen ·

    I nearly always open Sublime Text from the command line using subl and have specific requirements for when it should open a new window or re-use one. If I'm opening a directory, then I would like it to re-use the same window if I have previously opened that directory. However if I open a random file, I never want that file in the last directory window as it's unrelated. To do this I wrote a… continue reading.

  • Offline command line translation with TranslateGemma + Ollama (opens on the source site)

    Evan Hahn ·

    I wrote a simple script that translates text at the command line, completely offline. Here’s an example of how it works on my computer: echo '¿Cómo estás?' | translate # => How are you? It combines a few tools: TranslateGemma, a special-purpose language model for translation Ollama, a tool for running language models locally Efficient Language Detector, a library that detects the language for a piece of text Here’s the pseudocode of how it works: source = read_stdin() # Uses Efficient Language Detector source_language = detect_language(source) # Uses JavaScript's `navigator.language`…

  • CSS fix to prevent orphan icons dropping to a new line (opens on the source site)

    Stanko Tadić ·

    When an HTML element becomes too narrow, its content starts to wrap into multiple lines. This is intended behavior and works well in many cases. However, for short text, it doesn't look great when the last word or icon drops to the next line, becoming an orphan. For example, you might see something like this: Click here for more info It doesn't look great when the icon is left alone on its own row. Luckily, there's a simple CSS solution. Solution # Only thing we need to add is a single line of CSS: text-wrap: balance; This property tells the browser to wrap the text in a way that best…

  • How to Set Date Time from Mac Command Line (opens on the source site)

    David Walsh ·

    Working on a web extension that ships to an app store and isn’t immediately modifiable, like a website, can be difficult. Since you cannot immediately deploy updates, you sometimes need to bake in hardcoded date-based logic. Testing future dates can be difficult if you don’t know how to quickly change the date on your local machine. To change the current date on your Mac, execute the following from command line: # Date Format: MMDDYYYY sudo date -I 06142024 This command does not modify time, only the current date. Using the same command to reset to current date is easy as well! The post How…

  • Animated line drawings with OpenCV (opens on the source site)

    Oona Räisänen ·

    OpenCV is a pretty versatile C++ computer vision library. Because I use it every day it has also become my go-to tool for creating simple animations at pixel level, for fun, and saving them as video files. This is not one of its core functions but happens to be possible using its GUI drawing tools. Below we'll take a look at some video art I wrote for a music project. It goes a bit further than just line drawings but the rest is pretty much just flavouring. As you'll see, creating images in OpenCV has a lot in common with how you would work with layers and filters in an image editor like GIMP…

  • AWS Command line: S3 content from stdin or to stdout (opens on the source site)

    Luciano Mammino ·

    The AWS CLI s3 cp command supports streaming content to and from S3 using stdin/stdout with the - argument. This enables powerful pipelines without intermediary files.

  • Animated line drawings with OpenCV (opens on the source site)

    Oona Räisänen ·

    OpenCV is a pretty versatile C++ computer vision library. Because I use it every day it has also become my go-to tool for creating simple animations at pixel level, for fun, and saving them as video files. This is not one of its core functions but happens to be possible using its GUI drawing tools. Below we'll take a look at some video art I wrote for a music project. It goes a bit further than just line drawings but the rest is pretty much just flavouring. As you'll see, creating images in OpenCV has a lot in common with how you would work with layers and filters in an image editor like GIMP…

Related topics

This page is generated automatically from the engineering blogs we follow. Every post links to its source, where it was published. See all sources.

Privacy choices

Reading never requires analytics. These choices last 90 days on this browser.

Essential sign-in and security storage always stays on. Read the privacy notice.