Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug

evensevenone posted:

People still log in by hand to production hosts?

In production, it is always worse than you think and there are always more people doing it.

Adbot
ADBOT LOVES YOU

Storysmith
Dec 31, 2006

evensevenone posted:

People still log in by hand to production hosts?

I'm a sysadmin. Yes, I shell into production hosts. We have configuration management and the like, our deploys are automated, and most of our logs are aggregated, but yes, there are times when you've gotta log in and see the current state of the system when managing it.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
You should treat anything that forces you to log into a prod server by hand as a bug in your workflow/tooling/etc. that needs to be fixed, but you'll never fix every possible bug.

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
http://www.theguardian.com/business/2015/may/01/us-aviation-authority-boeing-787-dreamliner-bug-could-cause-loss-of-control
If a Boeing 787's electrical generators are powered on at the same time and kept on for longer than 248 days (2^31 centiseconds) then they will shutdown and the plane might crash. Being patched Q4 2015.

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies

Aleksei Vasiliev posted:

http://www.theguardian.com/business/2015/may/01/us-aviation-authority-boeing-787-dreamliner-bug-could-cause-loss-of-control
If a Boeing 787's electrical generators are powered on at the same time and kept on for longer than 248 days (2^31 centiseconds) then they will shutdown and the plane might crash. Being patched Q4 2015.
What are these generators and why would they be on for 8 months continuously?

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Shoulda used JavaScript.

kitten smoothie
Dec 29, 2001

Master_Odin posted:

What are these generators and why would they be on for 8 months continuously?

From what I gather the generators use the engines to provide power to the plane in flight, and at issue is software in some computer units that manage those generators. I imagine if the engines are powered off maybe there's some battery power unit, or shore power if parked at a gate, that keeps the computers hot.

I've always wondered how the avionics stuff like this works. I guess they don't completely power down aircraft if they're idle overnight or whatever? I can imagine there's not just a set of keys and an ignition switch in the cockpit like your car.

xzzy
Mar 5, 2009

Pilots get smug about their uptime just like unix admins.

Steve French
Sep 8, 2003

code:
class Foo
  def initialize
    @tempfile = Tempfile.new("foo")
    @tempfile.write("ugh")
    @tempfile.rewind
  end
end

f = Foo.new
puts f.to_json
puts f.to_json

# Normal ruby:
# "#<Foo:0x007f6bbc39f420>"
# "#<Foo:0x007f6bbc39f420>"

# Rails hellscape:
# "{\"tempfile\":[\"ugh\"]}"
# "{\"tempfile\":[]}"
https://github.com/rails/rails/blob/v3.2.21/activesupport/lib/active_support/json/encoding.rb#L144-L284

Specifically:
code:
class Object
  def as_json(options = nil) #:nodoc:
    if respond_to?(:to_hash)
      to_hash
    else
      instance_values
    end
  end
end
code:
module Enumerable
  def as_json(options = nil) #:nodoc:
    to_a.as_json(options)
  end
end

Volguus
Mar 3, 2009

kitten smoothie posted:

From what I gather the generators use the engines to provide power to the plane in flight, and at issue is software in some computer units that manage those generators. I imagine if the engines are powered off maybe there's some battery power unit, or shore power if parked at a gate, that keeps the computers hot.

I've always wondered how the avionics stuff like this works. I guess they don't completely power down aircraft if they're idle overnight or whatever? I can imagine there's not just a set of keys and an ignition switch in the cockpit like your car.

I imagine (I'm not a pilot and I have no idea what I'm talking about) that is more a question of economics. These planes do not turn off. They land on an airport, get the people and luggage off, they board new people and luggage, then they take off. To shut them down would mean to lose money and they only make money while in the air. Given the price tag for one, it would not be surprising that these kind of planes would be (ab)used for 248 days non-stop.

Kilson
Jan 16, 2003

I EAT LITTLE CHILDREN FOR BREAKFAST !!11!!1!!!!111!

Volguus posted:

I imagine (I'm not a pilot and I have no idea what I'm talking about) that is more a question of economics. These planes do not turn off. They land on an airport, get the people and luggage off, they board new people and luggage, then they take off. To shut them down would mean to lose money and they only make money while in the air. Given the price tag for one, it would not be surprising that these kind of planes would be (ab)used for 248 days non-stop.

They have a hangar maintenance once every 6 months taking 1-3 days, where I assume it's turned off at some point.

...if they follow standard recommended protocol.

KaneTW
Dec 2, 2011

Kilson posted:

They have a hangar maintenance once every 6 months taking 1-3 days, where I assume it's turned off at some point.

...if they follow standard recommended protocol.

Every 6 months is 183 days. Not that much of a stretch if some company extends that by 2 months.

Steve French
Sep 8, 2003

Steve French posted:

code:
class Foo
  def initialize
    @tempfile = Tempfile.new("foo")
    @tempfile.write("ugh")
    @tempfile.rewind
  end
end

f = Foo.new
puts f.to_json
puts f.to_json

# Normal ruby:
# "#<Foo:0x007f6bbc39f420>"
# "#<Foo:0x007f6bbc39f420>"

# Rails hellscape:
# "{\"tempfile\":[\"ugh\"]}"
# "{\"tempfile\":[]}"
https://github.com/rails/rails/blob/v3.2.21/activesupport/lib/active_support/json/encoding.rb#L144-L284

Specifically:
code:
class Object
  def as_json(options = nil) #:nodoc:
    if respond_to?(:to_hash)
      to_hash
    else
      instance_values
    end
  end
end
code:
module Enumerable
  def as_json(options = nil) #:nodoc:
    to_a.as_json(options)
  end
end

It's come to this...

code:
        if IO.instance_methods.include?(:as_json)
          class IO
            def as_json
              inspect
            end
          end
        end

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Am I the horror or is there a reason it's to_json in the example & as_json in the pasted library code?

Mellow_
Sep 13, 2010

:frog:

Yeah I'd be looking to get out asap that sounds like a loving nightmare.

How do these people keep their jobs as software devs?

Steve French
Sep 8, 2003

Snapchat A Titty posted:

Am I the horror or is there a reason it's to_json in the example & as_json in the pasted library code?

No, I excluded a whole bunch of intermediate code for the sake of brevity.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

Aleksei Vasiliev posted:

http://www.theguardian.com/business/2015/may/01/us-aviation-authority-boeing-787-dreamliner-bug-could-cause-loss-of-control
If a Boeing 787's electrical generators are powered on at the same time and kept on for longer than 248 days (2^31 centiseconds) then they will shutdown and the plane might crash. Being patched Q4 2015.

Meh, it's no Therac-25 or Toyota ECU firmware.

loinburger
Jul 10, 2004
Sweet Sauce Jones
I recently changed jobs, and my first task was to fix a Spring/Java project that was originally written by Coworker (me: "fix it how?" boss: "Just... just fix it"). A process starts when the user makes a REST call; this initializes a table (or whatever it's called) in Mongo with a list of sub-tasks that need to be performed, then these tasks are read from and deleted from Mongo as they're executed i.e. Mongo is basically just acting like a queue. There was absolutely no reason to have a persistent queue in Mongo, so I replaced it with an in-memory ConcurrentLinkedQueue. Later, Coworker reviewed the changes. This is heavily paraphrased owing to my lack of respect for him.

Coworker: What happened to Mongo?
me: We didn't need a persistent queue, so I switched to an in-memory queue.
Coworker: But Mongo was the queue!
me: Yeah, now we've got a faster and less complicated queue.
Coworker: But I like Mongo!
me: Tell you what - how about if I write the task logs to Mongo.
Coworker: Yayyyyy!

It also turns out that this is this guy's first time ever using Mongo, so I suspect he reads random blogs on this sort of thing and decides that he's got to shoehorn some random crap into his next project.

Hughlander
May 11, 2005

loinburger posted:

It also turns out that this is this guy's first time ever using Mongo, so I suspect he reads random blogs on this sort of thing and decides that he's got to shoehorn some random crap into his next project.

Uhh loinburger? I can't find any blog posts that say that ConcurrentLinkedQueue is webscale. We should use Mongo.

Deus Rex
Mar 5, 2005

Steve French posted:

code:
class Foo
  def initialize
    @tempfile = Tempfile.new("foo")
    @tempfile.write("ugh")
    @tempfile.rewind
  end
end

f = Foo.new
puts f.to_json
puts f.to_json

# Normal ruby:
# "#<Foo:0x007f6bbc39f420>"
# "#<Foo:0x007f6bbc39f420>"

# Rails hellscape:
# "{\"tempfile\":[\"ugh\"]}"
# "{\"tempfile\":[]}"
https://github.com/rails/rails/blob/v3.2.21/activesupport/lib/active_support/json/encoding.rb#L144-L284

Specifically:
code:
class Object
  def as_json(options = nil) #:nodoc:
    if respond_to?(:to_hash)
      to_hash
    else
      instance_values
    end
  end
end
code:
module Enumerable
  def as_json(options = nil) #:nodoc:
    to_a.as_json(options)
  end
end

Honestly I think it's somewhat horrific that File is directly Enumerable to begin with.

kitten smoothie
Dec 29, 2001

re 787 talk, apparently rebooting the plane takes a few hours if this story is to be believed.

Also a pretty cool doc about the architecture of the power systems on the 787, I didn't realize that a lot of systems on other older jet designs were basically pneumatic.

Impotence
Nov 8, 2010
Lipstick Apathy

Hughlander posted:

Uhh loinburger? I can't find any blog posts that say that ConcurrentLinkedQueue is webscale. We should use Mongo.

You need Macbook Pro Retina benchmarks too.

sarehu
Apr 20, 2007

(call/cc call/cc)

Biowarfare posted:

You need Macbook Pro Retina benchmarks too.

This was so, so, so, sooo true at my previous job. The worst thing is that OS X is the worst thing to run a database on.

Spatial
Nov 15, 2007

"Guys maybe you should use int64_t here so people don't die from your lack of foresight."

"This use case is unsupported."

"Just reboot the plane every month."

[closed] [wontfix]

Impotence
Nov 8, 2010
Lipstick Apathy

sarehu posted:

This was so, so, so, sooo true at my previous job. The worst thing is that OS X is the worst thing to run a database on.

Why do you hate hfs?

Firstkind
Apr 10, 2015

by 2017 exmarx
I understand about 20% of the poo poo in this thread. I am googling poo poo like mad and researching all this garbage I don't know. But I have to say this one out loud.

Doctor w-rw-rw- posted:


[*] Proliferation of bidirectional, stateful relationships between objects. Two-way strong references, too.


You can't be real. You made that all up didn't you. I refuse to believe that this makes sense to someone.

Two and a half years of programming major collage and this loving profession that is progressing and changing at a thousand miles an hour and you guys drop lines like that. Have you seen what you loving nerds have done to me? Look at this poo poo.



This is a loving picture of programming languages up to 2001. I have taken classes for years of my life and know FOUR. C,C++,C# and Java. Two of my known languages are literally inches away from being the same as the other but decided to use entirely different keywords and foundations. If I hear about another person making a programming language that "does it better" and they are in driving distance I am going to commit a homicide. I went out job hunting and look at job details and see this loving rat nest of poo poo I have never heard of being used in my life as a requirement for employment. I just want to program some poo poo and this starting point is five miles offshore in a speedboat with loving wings. How do you people even have an industry? Two thirds of the united states can't even say who represents them in Congress, Pinpoint 15+ countries on a map, install windows, understand a single unix command, or who took Berlin in WW2.

I want in on this racket because I predict in ten years time you will make programming so loving convoluted that you will either cause the end of the world or permanent job security because no one can teach it in school any longer.

gently caress. Coding itself is the real horror.

Deus Rex
Mar 5, 2005



http://www.mayoclinic.org/healthy-lifestyle/stress-management/in-depth/relaxation-technique/art-20045368

Soricidus
Oct 21, 2010
freedom-hating statist shill
The horror was inside us all along

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

Firstkind posted:



This is a loving picture of programming languages up to 2001. I have taken classes for years of my life and know FOUR. C,C++,C# and Java.

You don't know four programming languages. You know four dialects of one. OK, you could argue that object orientation is a fairly major feature, so C could be considered to be more of an ancestor to the others, but it's still all imperative.

But don't worry too much about that. You'll probably never encounter a job that requires something fundamentally different, like a functional (Lisp, Haskell etc.) or—God forbid—logical programming language. As for all those toy scripting languages like Ruby, Python or whatever the current fashion is, as you become more experienced you should be able to pick those up as you go.

Linear Zoetrope
Nov 28, 2011

A hero must cook

Zopotantor posted:

logical programming language

Prolog: where you have a logically valid horn clause that infinitely recurses because you put two predicates in the wrong order. :negative:

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.
So you know C++, eh? What does that even mean?

Seriously, be happy you're only concerned about languages. You could be in JavaScript land and wondering about what framework to pick.

Jeb Bush 2012
Apr 4, 2007

A mathematician, like a painter or poet, is a maker of patterns. If his patterns are more permanent than theirs, it is because they are made with ideas.

Zopotantor posted:

You don't know four programming languages. You know four dialects of one. OK, you could argue that object orientation is a fairly major feature, so C could be considered to be more of an ancestor to the others, but it's still all imperative.

But don't worry too much about that. You'll probably never encounter a job that requires something fundamentally different, like a functional (Lisp, Haskell etc.) or—God forbid—logical programming language. As for all those toy scripting languages like Ruby, Python or whatever the current fashion is, as you become more experienced you should be able to pick those up as you go.

"Programming language" is a phrase that already has a commonly accepted meaning, please don't try to redefine it to mean "programming language paradigm" or whatever as part of some dumb intellectual intimidation game

Dicky B
Mar 23, 2004

Skuto posted:

So you know C++, eh? What does that even mean?
I've programmed C++ every working day for the last 5 years and I feel like I'm beginning to approach a state of being able to say that I almost "know" C++. :cheers:

Firstkind posted:

You can't be real. You made that all up didn't you. I refuse to believe that this makes sense to someone.
It's just a way of saying "high coupling"

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Firstkind posted:

gently caress. Coding itself is the real horror.

Just git gud with the languages you know. Programming skill is separate from knowing the syntax of a language.

C, C++, C# and Java are a pretty good choice for years from now.

Make small utilities with languages you don't know yet. E.g. install greasemonkey or tampermonkey and make user scripts (in javascript) to tweak web pages you use a lot. That's how I got started with JS.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Skuto posted:

So you know C++, eh? What does that even mean?
You know that every C++ line you write is a disaster waiting to happen but you keep drowning out those thoughts in alcohol.

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Skuto posted:

So you know C++, eh? What does that even mean?

Seriously, be happy you're only concerned about languages. You could be in JavaScript land and wondering about what framework to pick.

In the end it won't matter since there will be a new one next year that will surely be SO MUCH BETTER THAN THE ONES WE HAVE NOW.

Now with the hype train on React currently the question is which of the Flux implementations to go with.

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.

Zopotantor posted:

But don't worry too much about that. You'll probably never encounter a job that requires something fundamentally different, like a functional (Lisp, Haskell etc.) or—God forbid—logical programming language. As for all those toy scripting languages like Ruby, Python or whatever the current fashion is, as you become more experienced you should be able to pick those up as you go.

VHDL go go.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Zopotantor posted:

You don't know four programming languages. You know four dialects of one.

Nobody who is familiar with both C++ and Java would claim that they are the same language. I will charitably assume you know one of them, and are being misled by the superficial syntactic similarities.

Wardende
Apr 27, 2013

Zopotantor posted:

You don't know four programming languages. You know four dialects of one. OK, you could argue that object orientation is a fairly major feature, so C could be considered to be more of an ancestor to the others, but it's still all imperative.

You can write procedural or functional code in all of those languages.

Adbot
ADBOT LOVES YOU

Pavlov
Oct 21, 2012

I've long been fascinated with how the alt-right develops elaborate and obscure dog whistles to try to communicate their meaning without having to say it out loud
Stepan Andreyevich Bandera being the most prominent example of that

Wardende posted:

functional code in all of those languages.

You also could write a Haskell program that uses only mutable state. That doesn't mean the language was designed to do that, or that it is at all helpful in doing it.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply