- Oct 2022
-
store.steampowered.com store.steampowered.com
-
Computer Gaming World named this the 34th worst game ever made? lol First of all, gaming mainstream media sucks. Yeah, they are terrible reviewers. IGN, Metacritic, GameSpot, all of them, I don't like or follow them. CGW is today a defunct 80s/90s magazine which I never read because I live in Brazil, but here we had similar ones which reviews sucked and they are all dead by now too.
.
-
in 1994, this was a great game for MS-DOS, a classic today, even a masterpiece as much as SimCity is if you ask me so. It's fun, difficult, complex, had decent graphics for MS-DOS, it's too robust for its time, just don't believe the mass media
.
-
-
store.steampowered.com store.steampowered.com
-
bares no explanation
-
And that was intentional with Freezeframe (spelled in Caps for some reason).
[all caps]
-
-
-
Note that one extra type that is accepted by convention is the Boolean type, which represents both the TrueClass and FalseClass types.
-
This type does not exist in Ruby, however.
-
Note: For keyword parameters, use @param, not @option.
I sure was looking for @option (knowing already about @param) and assuming/expecting that (if it exists) it would totally be the right thing to use for documenting keyword parameters. So I was quite surprised to see this much-needed warning (for me and others like me who came here expecting/assuming the same thing).
-
-
yardoc.org yardoc.org
-
-
en.wikipedia.org en.wikipedia.org
-
created an ancillary tool, named Yardstick, which verifies YARD (or RDoc) documentation coverage.
-
-
Several templates and tools are available to assist in formatting, such as Reflinks (documentation), reFill (documentation) and Citation bot (documentation)
I clicked the link for reFill and thought it looked interesting. Would like to look into this further.
-
-
-
Another possibility is that the alternator will take on the task of recharging a depleted automotive battery. As a result of this increased strain on your alternator, you may notice that your car’s alternator begins to fail.
-
-
ricksfreeautorepairadvice.com ricksfreeautorepairadvice.com
-
Your alternator is NOT a chargerThe alternator’s job is to supply the power needed for all electrical items on the vehicle, plus replenish the battery from the last start up. The alternator is not a battery charger so much as it is a battery maintainer. If the alternator has to recharge an overly discharged battery, the alternator will become over-worked, which will shorten its life.If you use your alternator to charge your dead battery, you will overheat the alternator during its charging process. The greater the amperage flowing through it, the higher the heat an alternator creates.Maximum Alternator Output Only Occurs at high RPMSAfter you start your car with jumper cables, the voltage regulator sees a discharged battery and commands maximum field in the rotor. But at 600 RPM, the alternator can only provide about 1/4th of its rated output. Let it idle for a long period and all you’ll do it overheat the rotor windings and burn up your expensive alternator. A 110-amp alternator can only output 110-amps at RPMS of 2,500 or more. So don’t even think about letting it idle to recharge the battery.A battery charger costs $40. A new Alternator $350Not exactly brain surgery, is it?The correct way to deal with this situation is to jump the battery (using a jumper pack is much safer than jumper cables) and driving it to a place where you can place a REAL battery charger on the battery.
Is this outdated info?
According to https://hyp.is/n7ZQpFF0Ee24ZbcIYA3xVQ/www.reddit.com/r/Cartalk/comments/aoks7b/how_much_idling_needed_after_jump_start_to/ it is. Which advice should we trust?
-
-
www.carproclub.com www.carproclub.com
-
Your Alternator Is Not A ChargerYes, you read that right. An alternator is designed to MAINTAIN your car battery, not recharge it from a deeply discharged state. Its designed to run at only 35-50% of its fully rated output. When you use your cars alternator to recharge a dead battery, you force it to run at nearly 100% of its rated capacity and that overheats the alternator and dramatically shortens its life.
This was the opinion also of https://hyp.is/YNQwwlF0Ee206UcS3HYLnA/www.reddit.com/r/Cartalk/comments/aoks7b/how_much_idling_needed_after_jump_start_to/
but are they misinformed?
-
-
www.reddit.com www.reddit.com
-
In the interest of reducing warranty claims (which are much more expensive than that incremental manufacturing cost) carmakers are sizing the whole unit to reliably accommodate the worst case draw (driver turns everything on at the same time, at idle).
-
This was much more of an issue a generation ago, when your ‘74 Chevy Nova or ‘69 Ford F-100 had a 35 amp alternator. Any car made in the last 15-20 years will have a 75 amp alternator as a bare minimum, and ratings well north of 100 amps are common in larger vehicles.There’s dozens of amps of headroom to charge the battery at idle speed, especially if you turn off the lights, stereo, HVAC, etc. That said, it’ll charge even more quickly if you drive the car.
This seems like more sound/trustworthy advice than the replied-to's advice/info.
-
This will KILL your alternator. You should get a battery charger or a trickle charger. Alternators go through hell when trying to recharge a fully depleted battery.
-
-
gamefound.com gamefound.com
-
After the first week of the campaign, we realized what are the main problematic pillars and fixed them right away. Nevertheless, even with these improvements and strong support from the Gamefound team, we’re not even close to achieving the backer numbers with which we could safely promise to create a game of the quality we think it deserves.
-
First and foremost, we need to acknowledge that even though the funding goal has been met–it does not meet the realistic costs of the project. Bluntly speaking, we did not have the confidence to showcase the real goal of ~1.5 million euros (which would be around 10k backers) in a crowdfunding world where “Funded in XY minutes!” is a regular highlight.
new tag: pressure to understate the real cost/estimate
-
-
sylvercard.itch.io sylvercard.itch.io
Tags
Annotators
URL
-
-
store.steampowered.com store.steampowered.com
-
Welch eine Perle da beinahe an mir vorüber gegangen wäre!Super Story, gute Steuerung, stimmige Musik, tolle Sprecher [DE], ...Ein rundum gutes Paket - und leider [zu] kurz ...Passiert in letzter Zeit selten, dass ich mich an an Game setze und es in einer Tour durchspiele.Hier war dem aber so - ich wollte wissen: was, warum, wieso, wer ... orrrrrrrrrrr Hier und da n Rätselchen - da wollte ich ja zuerst nicht mehr, sind nicht so mein Fall.Sind aber alle nach den zweiten mal "schauen" mit dem Hausverstand lösbar, haben also keinesfalls den Spielfluss gehemmt und eher der [etwas] spielverlängernden Unterhaltung gedient, waren okay.Von mir bekommt das Game solide 8.5/10 Read More
Tags
Annotators
URL
-
-
store.steampowered.com store.steampowered.com
-
i was a bit unsure what to think of it, as i wished to go into this 100% blind. And boy am i glad i did.
-
-
stackoverflow.com stackoverflow.com
-
Auto Margins With auto margins, flex items can be centered, spaced away or packed into sub-groups. Unlike justify-content, which is applied to the flex container, auto margins go on flex items. They work by consuming all free space in the specified direction. Align group of flex items to the right, but first item to the left Scenario from the question: making a group of flex items align-right (justify-content: flex-end) but have the first item align left (justify-self: flex-start) Consider a header section with a group of nav items and a logo. With justify-self the logo could be aligned left while the nav items stay far right, and the whole thing adjusts smoothly ("flexes") to different screen sizes.
-
-
superuser.com superuser.com
-
apple.stackexchange.com apple.stackexchange.com
-
This is great because it works in Terminal, iTerm2, Chrome, Sublime & Outlook. The alternative (Karabina) is less good because that maps "Home" to Command+LeftArrow, which actually switches windows in Terminal.
-
-
webmasters.stackexchange.com webmasters.stackexchange.com
-
The answer is simple and here is an oversimplified example: // Your browser is identifying itself as this $ua_string = 'EDGE'; // The website logic is this if($ua_string === 'IE') { echo 'You are using IE'; } elseif($ua_string === 'FIREFOX') { echo 'You are using Firefox'; } else { echo 'You are using Chrome, and we don\'t support that.'; }
answering using source code
-
-
po-ru.com po-ru.com
-
But what if we’ve more elements to ignore? people = { "Alice" => ["green", 34, "alice@example.com"], "Bob" => ["brown", 27, "bob@example.com"] } No problem. Just re-use the underscore: people.map { |name, (_, _, email)| [name, email] } You can’t do it with any variable, though, at least in Ruby 1.9. It only works with variables that are called _: people.map { |name, (x, x, email)| [name, email] } # SyntaxError: (eval):2: duplicated argument name
-
-
stackoverflow.com stackoverflow.com
-
No, I am interested in gathering all of the optional, named Keyword Parameters into a hash. I am not trying to create a new options hash. I want a hash of {:name => val, :color => val, etc.}, which are named in the method signature.
-
opts = method(__method__).parameters.map(&:last).map { |p| [p, eval(p.to_s)] }.to_h SomeOtherObject.some_other_method(opts)
-
Better to use binding.local_variable_get(p) instead of eval(p.to_s) when using local_variables, just to avoid that evil eval
.
-
that's right, we don't want to do params = { ... } because then we're hardcoding the implementation and it becomes very coupled. The benefit of doing it like in my examples is that you can change the method signature and still automatically capture all keyword parameters.
-
Ruby 2.2 introduced Binding#local_variables which can be used instead of Method#parameters
-
-
support.humblebundle.com support.humblebundle.com
-
While splits on each bundle will vary, on average, there will be a minimum amount for Humble Bundle, generally between 15 - 30%. This minimum amount will allow Humble Bundle to continue offering great prices on amazing games, books, and software, all while supporting important charitable initiatives with every purchase. This minimum amount also lets us invest in exciting content to continue to grow the Humble community which ultimately drives more donations for charitable causes.
positive spin on the required minimum
-
-
www.hanselman.com www.hanselman.com
-
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
Probably would be better to use:
git remote set-head origin -a
-
git config --global init.defaultBranch main
-
-
gitbetter.substack.com gitbetter.substack.com
-
git remote set-head origin -aThe above command will query the remote host for the HEAD upstream and it updates that upstream in the local.
-
There is evidence that states it was intended to mention master-copy or master recording. And it is not intended to master-slave.
.
-
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
I like it. I’m biased though since I’m a sucker for opportunities to simplify like this one.
-
Current ruby releases generate *.tar.gz, *.tar.bz2, *.tar.xz, and *.zip. But I think we can stop generating *.tar.bz2. I think *.tar.bz2 are less merit. For better size, *.tar.xz exist. For better compatibility, *.tar.gz and *.zip exist.
-
-
github.com github.com
-
passenger-docker images contain an Ubuntu 20.04 operating system. You may want to update this OS from time to time, for example to pull in the latest security updates. OpenSSL is a notorious example. Vulnerabilities are discovered in OpenSSL on a regular basis, so you should keep OpenSSL up-to-date as much as you can. While we release passenger-docker images with the latest OS updates from time to time, you do not have to rely on us. You can update the OS inside passenger-docker images yourself, and it is recommend that you do this instead of waiting for us.
-
apt-get upgrade -y -o Dpkg::Options::="--force-confold"
-
-
www.phusionpassenger.com www.phusionpassenger.com
-
-
multitenancy. The Nginx and Apache integration modes can host multiple apps at the same time.
-
The Ruby on Rails framework provides a builtin server tool, which you can access with the rails server command. The "rails server" is not an application server by itself, but just a small wrapper that launches your application in an application server. This is why people do not use "rails server" in production. They use an application server – such as Passenger – directly. "rails server" uses Puma by default as of Rails 5.
-
-
www.ruby-lang.org www.ruby-lang.org
-
Please be sure to read Ruby’s License.
Why draw attention to this?
-
-
en.wikipedia.org en.wikipedia.org
Tags
Annotators
URL
-
-
blog.appsignal.com blog.appsignal.com
-
def initialize_copy(original_animal) self.age = 0 super end def initialize_dup(original_animal) self.dna = generate_dna self.name = "A new name" super end def initialize_clone(original_animal) self.name = "#{original_animal.name} 2" super end
-
Now that we have seen this implementation, you might be wondering what is the use case for having two #initialize_* methods. The answer is: there is another way to copy objects, called #clone. You generally use #clone if you want to copy an object including its internal state. This is what Rails is using with its #dup method on ActiveRecord. It uses #dup to allow you to duplicate a record without its "internal" state (id and timestamps), and leaves #clone up to Ruby to implement.
-
Are There Other Methods to Copy Something?
-
If we would have kept the call to super out of the #initialize_dup method, we would never have called initialize_copy, so it is important to keep that in.
-
An interesting fact here is that Rails deliberately chose to override the #initialize_dup method instead of the #initialize_copy method. Why would it do that? Let's investigate.
-
-
stackoverflow.com stackoverflow.com
-
what fixed my issue was: remove the node-sass from package.json npm install install it again in latest version via npm install --save-dev node-sass if you find this helpful, I assume you just need to upgrade your node-sass for the latest version because it uses node-gyp as a lower version.
-
-
www.reddit.com www.reddit.com
-
"I thought WSL ran as root in Windows" ... ABSOLUTELY NOT! Do you think we're crazy? ;) When opened normally, your Bash instances are launched with standard Windows user rights. If you want to edit your Windows hosts file, you must do so from an elevated Bash instance ... though only do this with enormous care - any other script you run in the same elevated Bash Console will also get admin rights to the rest of your machine!!
-
-
unix.stackexchange.com unix.stackexchange.com
-
The bash manual contains the statement For almost every purpose, aliases are superseded by shell functions.
-
Functions are much more flexible than aliases. The following would overload the usual ls with a version that always does ls -F (arguments are passed in $@, including any flags that you use), pretty much as the alias alias ls="ls -F" would do: ls () { command ls -F "$@" }
-
Simply don't use aliases in scripts. It makes little sense to use a feature designed for interactive use in scripts. Instead, use functions
-
-
www.youtube.com www.youtube.com
Tags
Annotators
URL
-
-
-
Options to import/export locally stored passwords have been a staple of Chrome for years. For god knows what reason either option seemed to randomly disappear in one Chrome Version and then re-appear in the next.Sometimes there was an import option with no export option, sometimes the other way round like right now, sometimes neither option was available, but you could always add either Option via chrome://flags.If they wanted to force people to use online sync only, why have options for local export still, but not import?
-
-
stackoverflow.com stackoverflow.com
-
You can even simplify this with the *** pattern that was added in version 2.6.7: + /mnt/ + /mnt/data/ + /mnt/data/i-want-to-rsyncthisdirectory/*** - /mnt/** This operator allows you to use the ** wildcard for exclusion and consequently to have only one exclude line.
What does * mean? And why is it used in the + line but is used in the - line?
-
which failed to work because of the trailing slash before the **. Removing the / made it all spring in to life as intended!
-
-
-
nickjanetakis.com nickjanetakis.com
Tags
Annotators
URL
-
-
nickjanetakis.com nickjanetakis.com
-
I had to do 13 steps just to get to the point where I can start writing. To make matters worse, I often compulsively close terminal windows after I am done. This is a process that gets repeated single every time I feel like writing.It’s actually a huge barrier of entry. Sure they are trivial tasks, but they take up a whole lot of mental energy.Living the good life is not all about money, it’s about avoiding stupid things like having to perform a tedious 30 second routine just to get started working on what you want to do.
-
-
-
-
askubuntu.com askubuntu.com
-
Note that fixing a deleted ESP requires re-creating not just the ESP itself, but the boot loader(s) that it used to contain. Such a repair will require the use of an emergency boot disk, like an Ubuntu disk in its "try before installing" mode. You'll also need to restore all the boot loader files. In the case of a Windows/Ubuntu dual-boot, this means recovering both OS's boot loaders. To simplify this task, I strongly recommend backing up the ESP. A file-level backup (using tar, cp, or similar tools) should be sufficient.
-
-
-
In all honesty, I haven't had the patience to experiment with the latter in order to gain certainty about it. Ditto for trusting the boundaries of firmware settings and booted drivers. Indeed, I don't really trust the standard 'buntu installer to reliably ensure that the external drive will even get an ESP partition - at least, without being explicitly told by a custom partitioning step.
-
-
www.reddit.com www.reddit.com
-
Yep, the easiest thing is to create a second EFI partition: https://pop.system76.com/docs/dual-booting-windows/It is still possible to encrypt your popOS ext4 partition using LUKS and LVM, though this won't just work out of the box.
-
-
www.linuxquestions.org www.linuxquestions.org
-
I'd like rsync to create the source dir structure on the remote, when I'm only synching a file in a sub-dir. At the moment it seems I need to do this in 2 commands, e.g.. ssh <remote> mkdir -p /backup/var/spool/cron/crontabs rsync -vauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/. Ideally, I'd like to be able to do this: rsync -Mvauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/.
-
-
www.linuxquestions.org www.linuxquestions.org
-
I'd like rsync to create the source dir structure on the remote, when I'm only synching a file in a sub-dir. At the moment it seems I need to do this in 2 commands, e.g.. ssh <remote> mkdir -p /backup/var/spool/cron/crontabs rsync -vauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/. Ideally, I'd like to be able to do this: rsync -Mvauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/. ...where M (make parents) is a new option that tells mkdir to do 'mkdir -p' on the remote target dir.
-
-
askubuntu.com askubuntu.com
-
refused connect from [IP-ADDRESS] ([IP-ADDRESS]) This particular message is emitted by the TCP wrappers library when it decides to reject a connection. Ubuntu's sshd is built to use TCP wrappers. Check the two files "/etc/hosts.allow" and "/etc/hosts.deny" on the ssh server. You have an entry in one of those files which causes ssh connections from that address to be rejected. See the Ubuntu man page for these files.
answered question: error message in logs but don't know where coming from
-
-
www.quora.com www.quora.com
-
Going first through an inverter from 12 V D.C to house hold 120 or 240 and than back again to laptop charger is very inefficient. You have the magnetization losses of both the inverter and the charger, which could be 8 or 10 VA each , it does not sound much but 16 VA at 12 Volt = 1.33 Amps without doing any real work for you.
inefficient
-
-
stackoverflow.com stackoverflow.com
-
With JSON Schema, you don't have to specify things. The syntax is declarative and adds restrictions. So if you don't want a restriction on the type of value that's allowed, don't use the type keyword.
-
-
-
www.imdb.com www.imdb.com
-
Just because a movie is what people call "cliche", doesn't mean its inherently bad.
-
-
blog.unity.com blog.unity.com
-
Why is the price of my Unity plan changing? The new price reflects the value of our products today, and it’s our first increase in almost three years. In that time, we’ve expanded our R&D resources by 172%, with the Unity Editor being our largest focus for R&D investment at Unity. This continued investment has helped us deliver Unity 2021 LTS with powerful improvements to workflows, rendering capabilities, and supported platforms. We will continue delivering improvements based on your feedback in every release to enhance your productivity, performance and stability.
positive spin
-
-
-
I expect RuboCop to either make no suggestion on how to resolve the ambiguity, or to suggest something that does not change the semantics of the code as it stands.
-
However, the code as it stands associates the block with bar, and if the code is currently working, the programmer should definitely not parenthesize the parameter, because it would change the meaning of the code.
Tags
Annotators
URL
-
-
github.com github.com
-
A better message, clarifying the true purpose of the cop, which I guess is to differentiate empty Hash literals and blocks.
-
But this sounds like spreading fear and doubt when the Ruby parser has no such concepts :) {} always binds tightly to the call right next to it. This block {} will never go to using, unless it's rewritten as do ... end.
-
-
github.com github.com
-
That's actually a false negative if it doesn't trigger the cop but should; a false positive is when it does trigger the cop/test/fire alarm/etc. but should not.
-
-
en.wikipedia.org en.wikipedia.org
-
new top-level element for describing Webhooks that are registered and managed out of band
Tags
Annotators
URL
-
-
openvalidation.io openvalidation.io
-
Machines understand languages, that are formal and rigid, with unique and unambiguous instructions that are interpreted in precisely one way. Those formal, abstract languages, and programming languages in general, are hard to understand for humans like ourselves. Primarily, they are tailored towards the requirements of the machine. The user is therefore forced to adapt to the complexity of the formal language.
.
-
Instead of forcing humans to understand the complex inner workings of machines, we should construct machines in a way, so they better understand us humans!
.
-
-
docs.openvalidation.io docs.openvalidation.io
-
This distinguishes this grammar from other programming languages or domain-specific languages.
-
The additional content is only relevant for human readability. The machine, on the other hand, ignores this addition. Thus it is possible to express the rules in a grammatically correct way on the one hand and to give them a semantic context on the other.
-
Rules formulated with openVALIDATION are thus at the same time a formal, machine-processable specification, but also a documentation that is easy for people to understand.
-
-
github.com github.com
-
var a = document.createElement("a"); a.href = blob; a.target = "_blank"; setTimeout(function() { click(a); });
-
-
-
www.amazon.com www.amazon.com
-
Also it expects you to buy a bunch of hardware like a raspberry pi and such in order to do the project. I kind of thought there was going to be some kind of public API that acted like a virtual weather sensor but apparently we're building a real one.
-
-
www.syncfusion.com www.syncfusion.com
-
elixir-lang.org elixir-lang.org
-
elixir-lang.org elixir-lang.org
-
nice list of books
Tags
Annotators
URL
-
-
www.amazon.com www.amazon.com
-
I failed to notice that, unlike the Whiz, which has the same distribution settings as a Scotts push spreader (i.e., settings 2 - 9 with half- and quarter-steps between) and which all products you use in a spreader, Scotts or not, conforms to in their instructions for telling you what to set the spreader at, the Whirl does NOT have these settings, meaning there's no way to follow directions on the packages of products you'll be using the Whirl spreader for, not even on the packages of products made by Scotts itself. That makes knowing what to set it at total guesswork, stabbing in the dark, which, as anyone knows who has ever burned their lawn with fertilizer knows, is very risky and potentially very costly. All Scotts gives you with the Whirl, after giving a disclaimer that you must "READ AND FOLLOW ALL LABEL DIRECTIONS OF THE PRODUCT YOU ARE APPLYING," which of course you can't do because those label directions give you a spreader setting that does NOT apply to this spreader, is generic instructions that say to set it at 1 for light seed, 3 for moderate fertilizer, and 5 for heavy ice-melt, only that's all very subjective and products, like fertilizers (even Scotts' own), don't all provide the same spreader setting by type but vary, meaning one fertalizer will tell you to set a standard spreader at 3 3/4, but another will tell you to set it at 5, while if you put any fertalizer on your lawn as heavily as you put ice-melt down, which is what the Whirl suggests for ice-melt, you'll burn your lawn.
-
-
www.homedepot.com www.homedepot.com
-
Topsoil has different grades. Lower-grade topsoils are meant for filling and leveling holes and should only be used for that purpose. Higher-grade topsoils are great for conditioning or adding organic matter to the native soil. Neither grade should be used when planting.
Should not be used for planting anything?? Hmm.
-
-
gardeninguru.com gardeninguru.com
-
-
moisten mixture after spreading (promotes compaction)
compaction good?
-
-
gardeninguru.com gardeninguru.com
-
clayey
-
-
-
www.housedigest.com www.housedigest.com
- Sep 2022
-
blog.mozilla.org blog.mozilla.org
-
In other words, i18n allows applications to support and satisfy the needs of multiple locales, thus “enabling” l10n.
one feature enables the other
-
“Internationalization is the design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language. Localization refers to the adaptation of a product, application or document content to meet the language, cultural and other requirements of a specific target market (a locale).”
-
-
douglasorr.github.io douglasorr.github.io
-
First, to clarify - what is "code", what is "data"? In this article, when I say "code", I mean something a human has written, that will be read by a machine (another program or hardware). When I say "data", I mean something a machine has written, that may be read by a machine, a human, or both. Therefore, a configuration file where you set logging.level = DEBUG is code, while virtual machine instructions emitted by a compiler are data. Of course, code is data, but I think this over-simplified view (humans write code, machines write data) will serve us best for now...
-
-
fonts.google.com fonts.google.com
-
Alle Menschen sind frei und gleich an Würde und Rechten
-
-
-
infinum.com infinum.com
-
set up
.
-
-
-
stackoverflow.com stackoverflow.com
-
Yes, using custom tags. Example in Python, making the !join tag join strings in an array:
-
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
@path.yield_self(&File.method(:read)).yield_self(&Parser.method(:new)) ...
-
-
Why not use map, which we already have for collections? Generally speaking, the map function isn't just about collections (though that's usually how it's used in Ruby). map is more about putting an object in a context (a block in Ruby's case), modifying the object, and returning the modified object.
-
I use only a subset of ruby that makes sense to me and I find appealing. Thankfully one can use ruby just fine without having to use everything.
not all or nothing
use just the parts you want
Tags
Annotators
URL
-
-
-
TylerRick commented
-
I ended up using a really poor hack, in my package.json, scripts: { ... "prebundle": "openapi bundle -o src/openapi.preprocessed.json spec/openapi.yaml --force --config .redocly.pre-processor.yaml 2>/dev/null && echo 'warning: errors from pre-processing step have been supressed'", "bundle": "openapi bundle -o src/openapi.json src/openapi.preprocessed.json ... }
-
-
github.com github.com
-
I don't know about you guys but I like dots on the second line when combined with indentation : # Example 1 one.two.three .four # Example 2 my_array.select { |str| str.size > 5 } .map { |str| str.downcase }
-
They require the continuation to be present at precisely next line. (I.e. you cannot put more than one in-line comment in between.)
.
-
The order of these method calls may or may not matter. With leading dots, editing is a bit easier, particularly when you need to add a new method call or change the order.
easier to edit
-
(Similar to the javascript issue, you always have to remember to remove/add the trailing comma, so some developers prefer to put 'comma' in the beginning of each property.)
-
-
-
openscad.org openscad.orgOpenSCAD2
-
The Programmers Solid 3D CAD Modeller
-
Tags
Annotators
URL
-
-
elixir-lang.org elixir-lang.org
-
Due to their lightweight nature, it is not uncommon to have hundreds of thousands of processes running concurrently in the same machine.
-
Spawn an Elixir process (not an operating system one!)
Tags
Annotators
URL
-
-
twig.symfony.com twig.symfony.com
-
-
www.syndicatetheory.com www.syndicatetheory.com
-
Do yourself and your peers a favor, write code with them in mind.
-
-
-
medium.com medium.com
-
Writing Code for Humans — A Language-Agnostic Guide…because code which people can’t read and understand is easy to break and hard to maintain.
-
-
metalblueberry.github.io metalblueberry.github.io
-
Also, the chances of breaking something are really high, because not even you remember how the code actually works.
-
Some people eventually realize that the code quality is important, but they lack of the time to do it. This is the typical situation when you work under pressure or time constrains. It is hard to explain to you boss that you need another week to prepare your code when it is “already working”. So you ship the code anyway because you can not afford to spent one week more.
-
your cognitive load increases with the level of indentation. 1 2 3 4 5 6 7 8 9 10 if r.Method == "GET" { if r.Header.Get("X-API-KEY") == key { // ok return nil }else{ return errors.New("Key is not valid") } } else { return errors.New("Invalid Method") }
-
Cognitive capacity is the total amount of information the brain is capable of retaining at any particular moment. This amount is finite, so we can say our total capacity is only ever 100%. How much of one’s cognitive capacity is being used towards a particular task at any given time is called the cognitive load
-
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
-
netstat -tn 2>/dev/null | grep :80 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head
-
To see if you are writing good code, you can question yourself. how long it will take to fully transfer this project to another person? If the answer is uff, I don’t know… a few months… your code is like a magic scroll. most people can run it, but no body understand how it works. Strangely, I’ve seen several places where the IT department consist in dark wizards that craft scrolls to magically do things. The less people that understand your scroll, the more powerfully it is. Just like if life were a video game.
-
it quickly becomes a mess of non related functions that anyone but the owner feels brave enough to import
-
A little copy paste is better than a little dependency.
-
Avoid indentation levels, If you find yourself with more than 3, you should create a function.
-
Code explains what and how Documentation explains why.
-
So make sure to write your documentation, but do not explain your spells.
-
This is so clear that you don’t even need comments to explain it.
-
Another type of comments are the ones trying to explain a spell.
-
Do not explain your spells, rewrite them.
-
Do you really need those lines? Isn’t it clear enough? Well, I still find comments like this in a lot of cases and it gets funnier when the comment is obsolete and the code is doing other things. Following the example, let’s imagine that another developer adds support for PUT method. I think that this is what would happen.
-
This code is much easier to understand as it do not add levels of indentation and follows the principle where the 0 indentation level is the principal path of the application where other paths are exceptions or rare cases.
-
people usually forgets about one of the greatest advantages of Open Source. YOU can fix the issue. You can download the source code and dig deep into the code allow you to keep moving. Also, you can merge this changes back to the original repository so others doesn’t have to fix it again. win-win relationship.
-
The rule of thumbs is, never use code that you do not understand.
Tags
- brave
- becomes outdated quickly
- readability
- documentation: inaccurate/outdated
- answer the "why?"
- cognitive capacity
- main path
- misc./utility package
- only the creator could truly love
- if you have to explain it, rewrite it to be simpler
- +1.0
- source code: comments
- work: manager who understands what you do
- open-source software: advantages of
- source code: avoid unneeded indentation levels
- pressure
- maintenance burden
- time constraints
- maintainability
- cognitive load
- annotation meta: may need new tag
- error path / failure track
- minimal dependencies
- documentation: good
- happy path
- source code: comments: explain why, not what or how
- open-source software: you can fix bugs yourself
- unrelated
- fear of breaking things
- error/exception handling
- unintentionally breaking something
- easy to forget
- I agree
- quotable
- +0.8
- hard to explain
- write code that humans can understand
- one-liners
- as the author/creator…
Annotators
URL
-
-
github.com github.com
-
:w saves.
-
I used to write code. I still do, but I used to, too.
-
-
github.com github.com
-
I don't like the first syntax because then you have weird looking code due to all the leading whitespace, and you lose a lot of real estate.
-
Aligning everything with however long the method name is makes every indention different. belongs_to :thing, class_name: 'ThisThing', foreign_key: :this_thing_id has_many :other_things, class_name: 'ThisOtherThing', foreign_key: :this_other_thing_id validates :field, presence: true Compared to the following, which all align nicely on the left. belongs_to :thing, class_name: 'ThisThing', foreign_key: :this_thing_id has_many :other_things, class_name: 'ThisOtherThing', foreign_key: :this_other_thing_id validates :field, presence: true
-
This one bugs me a lot, but honestly, I don't like either style of the "normal method calls" above. I'm definitely voting to change the rule, but I'd also recommend trying to use the following syntax. In my opinion, it's the best of both worlds. a_relatively_long_method_call( :thing, :another_thing ) Or, if there are a lot or arguments, or the arguments are long: a_relatively_long_method_call( :a_long_argument, :another_long_argument, :a_third_long_argument )
-
-
medium.com medium.com
-
When I ask people about any part of their code, they usually say it's easy to understand. But when I open the code, it takes me a couple hours slapping to my face to keep myself alive to understand just a little part of their code.
-
The best book that I can recommend to any developer to shape up their attitude about programming.
-
But how much readability are enough?
-
In collusion, writing good code not only require knowledge but also require compassion. To understand people's pain and mistakes, to think about your teammate and to help everyone achieve a better life.
-
collusion
-
Think about how good it is if you can build a system at “2 half brain quality” and then people just need use 1 half of their brain to maintain it. You can fix bug in a blink of an eye, run tests and give it to tester, done. Everything will be done in a easiest way and fixing bug or refactoring can be easy like breathing. The most heavy task in programming is not about building application, but it’s about maintain them and if you wrote something you can’t understand, then you will suffer for the rest of your life.
-
they’re just too familiar with the code to think it's complicated
-
Write code for human, not for God
-
-
-
400 Bad Request is the status code to return when the form of the client request is not as the API expects.401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials.403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource.
-
-
Is there a problem or not?If there is a problem, on which side is it? On the client or on the server side?
-
-
github.com github.com
-
I said I wanted begin..end to follow the same indentation principles as if..end because they are semantically related (both are expressions), and I stand by that opinion.
-
-
github.com github.com
-
Hey, checking from a few months in the future here. Is there by chance an update on this issue?
-
Unfortunately, the conversation on both PRs died off (no hard feelings, people have other things going on in their lives).
-
The RuboCop way is to offer an opinion in the way of a good default, but to accommodate all reasonable style choices.
-
really begin/end is just a way to pass several expressions where you normally need to pass only one. In this way I think it's much closer to something like conditionals (e.g. if, than to do).
-
in my personal opinion, there shouldn't be a special treatment of do-end blocks in general. I believe that anything that starts a "block", i.e. something that is terminated by and end, should have the same indentation logic
-
-
stackoverflow.com stackoverflow.com
-
The point of that line was, "I tried irrelevant things and they obviously didn't work." I ate a banana while trying it- should I include that in the steps as well? The other work I did was not relevant, therefore, not mentioned explicitly outside of "I'm frustrated and just trying rubbish at this point." I could have been more clear saying that I've tried each of the available options on the 3 relevant to no avail, you are correct.
-
-
www.codementor.io www.codementor.io
-
I have a simple coding principle: write lines of code as though instructing a real person how to do the job. And that naturally expands to designing and modelling systems like real organisations with their own divisions, departments, branches, and all the various “job positions” that need to be filled. Make the whole system appear as human as possible.
-
-
Conventions are good, but they are very limited: enforce them too little and the programmer becomes coupled to the code—no one will ever understand what they meant once they are gone. Enforce too much and you will have hour-long debates about every space and colon (true story.) The “habitable zone” is very narrow and easy to miss.
-
-
-
concurrent-safe
-
The variable a is incremented thanks to the atomic memory primitives function addInt that is concurrent-safe. However, we assign the result to the same variable, which is a not a concurrent-safe write operation. This a careless mistake detected by the atomic analyzer.
first sighting: concurrent-safe
-
-
docs.openvalidation.io docs.openvalidation.io
-
The rules recorded in natural language are readable not only by humans but also by the computer and therefore no longer need to be programmed by a software developer. This task is now taken over by openVALIDATION.
-
openVALIDATION enables programming of complex validation rules using natural language, such as German or English.
-
-
rororo.readthedocs.io rororo.readthedocs.io
-
"detail": [ { "loc": [ "body", "name" ], "message": "Field required" }, { "loc": [ "body", "email" ], "message": "'not-email' is not an 'email'" } ]
not complient with Problem Details, which requires
details
to be a string
-
-
lurumad.github.io lurumad.github.io
-
jonathancrozier.com jonathancrozier.com
-
For example, let’s consider the type property. For most of the projects I am working on, it isn’t practical to have a webpage dedicated to each type of possible error.
That's not required. The standard doesn't require this to be a URL locator — merely a URI! So you can just make up a URI and use it even if it's not resolvable. ... like you did for the URN below.
-
For the instance property, the most practical way I’ve found of implementing this is to define a URN that encapsulates additional information regarding the error. Here is an example URN for reference. urn:companyname:api:error:protocol:badRequest:f29f57d7-e1f8-4643-b226-fa18f15e9b71
-
-
steamcommunity.com steamcommunity.com
-
We decided to follow their rules to stay in their affiliate program, because that's how we are able to actually run the site (without any ads).And if you look on the issue from the usability point of view, not having their price history isn't that big of a deal, unless the game is sold only on Amazon - and most games aren't - so you always have other stores to compare the price to.
-
Hi L0ki,as we depend on retailers with affiliate programs to run the site without ads, and Amazon being one of them, yes, we are following their rules so we can use API and their affiliate program.As Tomas said, we are also trying to get the history back, though we noticed we aren't the only site being affected by this.As for ignoring their API and doing it the hard way - that could be possible I guess but really not preferable.And we also understand anybody not wanting to buy from Amazon anymore (as some already told us), but to be fair, if the game is available anywhere else (and I have yet to randomly find a game which is available only at Amazon), you can always check the game info on ITAD to compare the price to other retailers.
-
If it's not, it should be illegal for them to forbid you from showing price history. This is restricting access to information, and it's probably supposed to benefit them from shady sales (increasing the base price just before a sale, so that the "X % off" is higher).
-
"We are not allowed to show you Amazon history"? What prompted this? Fill me in if I missed something :).EDIT: Camelcamelcamel can still show Amazon price history, so a bit befuddled here.
-
I would be interested to know what the legality of this is either way. I mean, do they really have any legal right to compel you not to list their price history? However, just knowing that Amazon doesn't want you to do this will make me less likely to purchase from them in the future. Anti-consumer behavior pisses me off. Edit: If this is related to API access couldn't you just manually scrape prices off the site instead and hammer their server? Or is this more related to not wanting to bite the hand that feeds you so to speak related to the funding you can get through referral links?
-
-
blog.restcase.com blog.restcase.com
-
"type": "https://example.com/problems/request-parameters-missing"
-
-
datatracker.ietf.org datatracker.ietf.org
-
This specification reserves the use of one URI as a problem type: The "about:blank" URI [RFC6694], when used as a problem type, indicates that the problem has no additional semantics beyond that of the HTTP status code. When "about:blank" is used, the title SHOULD be the same as the recommended HTTP status phrase for that code (e.g., "Not Found" for 404, and so on), although it MAY be localized to suit client preferences (expressed with the Accept-Language request header). Please note that according to how the "type" member is defined (Section 3.1), the "about:blank" URI is the default value for that member. Consequently, any problem details object not carrying an explicit "type" member implicitly uses this URI.
annoying limitation
have to come up with unique (and unchanging?) URIs up front
otherwise (if type is omitted), this restrictive "about:blank" URI is assumed by default
-
-
www.rfc-editor.org www.rfc-editor.org
-
-
Note that industry consortia as well as non-commercial entities that do not qualify as recognized standards-related organizations can quite appropriately register media types in the vendor tree.
not limited to comerercial
-
The media type specification and registration procedure is now a separate document, to make it clear that it is independent of MIME.
-
-
en.wikipedia.org en.wikipedia.org
-
they allow resources to be referred to without the need for a continuously available host, and can be generated by anyone who already has the file, without the need for a central authority to issue them. This makes them popular for use as "guaranteed" search terms within the file sharing community where anyone can distribute a magnet link to ensure that the resource retrieved by that link is the one intended, regardless of how it is retrieved.
Tags
Annotators
URL
-
-
auth0.com auth0.com
-
However, while URLs allow you to locate a resource, a URI simply identifies a resource. This means that a URI is not necessarily intended as an address to get a resource. It is meant just as an identifier.
However, while URLs allow you to locate a resource, a URI simply identifies a resource.
Very untrue/misleading! It doesn't simply (only) identify it. It includes URLs, so a URI may be a locator, a name, or both!
https://datatracker.ietf.org/doc/html/rfc3986 states it better and perfectly:
A URI can be further classified as a locator, a name, or both. The term "Uniform Resource Locator" (URL) refers to the subset of URIs that, in addition to identifying a resource, provide a means of locating the resource by describing its primary access mechanism (e.g., its network "location").
This means that a URI is not necessarily intended as an address to get a resource. It is meant just as an identifier.
The "is not necessarily" part is correct. The "is meant" part is incorrect; shoudl be "may only be meant as".
-
-
github.com github.com
-
pointer: type: string description: A string containing a JSON pointer to the specific field within a received JSON body that caused the problem, e.g. '/data/attributes/title' to refer to the `title` property within the `attributes` object that is a child of the top level `data` object. example: /data/attributes/title
-
-
github.com github.com
-
TylerRick commented
Tags
Annotators
URL
-
-
github.com github.com
-
with the caveat that the split->bundle will be lossy with respect to YAML comments/format. I've thought about it more and think, "so what?" If it enables teams to be more productive, great.
Tags
Annotators
URL
-