HNHacker News
TopNewBestAskShowJobs

c4wrd

144 karma · joined September 23, 2019

submissionscomments
c4wrd··on Competitive Programming with AlphaCode
Ask and you shall receive, here is the output it gave me: // Write a Go function to swap the sixth bit and seventeenth bit of a 32-bit signed integer.

    package main
    
    import (
     "fmt"
     "math"
    )
    
    func main() {
     var a int32 = 0b1010101010101010101010101010101010101010101010101010101010101010
     fmt.Printf("%b\n", a)
     fmt.Printf("%b\n", swapBits(a, 6, 17))
    }
    
    func swapBits(a int32, i int, j int) int32 {
     // convert to binary
     bin := fmt.Sprintf("%b", a)
     // get the bits
     bit1 := bin[i-1 : i]
     bit2 := bin[j-1 : j]
     // swap the bits
     bin = bin[:i-1] + bit2 + bin[i:]
     bin = bin[:j-1] + bit1 + bin[j:]
     // convert back to int
     return int32(bin2int(bin))
    }
    
    func bin2int(bin string) int64 {
     var sum int64
     for i, v := range bin {
      if v == '1' {
       sum += int64(math.Pow(2, float64(len(bin)-i-1)))
      }
     }
     return sum
    }
c4wrd··on Starting in 2017, Facebook treated emoji reactions as more valuable than likes
In my opinion this makes sense? To react with an emoji, it requires more interaction from the user (tap and hold instead of a simple tap), which you could make an assumption that it signals it received more of the user's attention and is more attention-worthy content. This can be both bad and good, but is not inherently bad in itself. I can see why some would argue that an angry emoji could lead to a more negative news feed, but five out of the seven emojis you can react with are "positive", so you could also argue that positive content would drown out the negative content (assuming that there's an even distribution of interactions between emojis). At the end of the day, this was part of a study to understand human behavior, and without the study they would have no understanding of how emoji reactions could be used to improve a user's feed and improve their platform.
c4wrd··on Bootstrapping a multiplayer server with Elixir
Is there any open source implementations of game servers/highly concurrent production servers like this for reference (or at least blog posts that contain a good amount of code)? I can find a lot of toy examples, but I'd love to see some insight onto an actual implementation of a product that is open-source as I'm learning Elixir.
c4wrd··on Dropbox Engineering Career Framework
One thing that I think many are missing in their understanding, is that this gives Junior to Mid-level engineers a path forward and direction to improve. Often it's the case an engineer will ask their manager "How can I improve or get to the next level?" and having reference documentation for how to impact an organization at a larger level is extremely handy. It also helps engineers relate their efforts to the bigger picture and help them formulate a vision for why we have a competency hierarchy and how to view it in terms of career frame-working.

At my company we also have a very similar engineering career framework, but the goal isn't to push everyone into boxes, but rather to help engineers understand what it means to have a large impact on an organization. This usually translates to more cross-team responsibilities and deliverables over longer periods of time.

c4wrd··on Google-led paper pushes back against claims of AI inefficiency
Although I do see the waste as some may say it is, I don’t think comparing a models emissions to that of the lifetime emissions of five average cars is fair and ultimately is hyperbolic, but please let me explain. Let’s say the average car lasts 20 years. Actually let’s say it lasts 50 years. Back of the hand math means shows that that’s equivalent to about 50*5=250 U.S. car emissions per year. Yes, that is a large number, but if you look at the value provided to society by things like voice translation, picture recognition, etc., that the set of all Google users enjoy, you have to consider that those models provide value to tens of millions of people, and the cost is equivalent to only 250 of those people driving cars for a year, i.e. the efficiency is pretty great in my opinion.

These news articles are hyperbolic and not addressing the true waste we have in society. Once again I’m not arguing that there isn’t inefficiency and waste, but we’re ignoring the fact that every one of the those Google users (or at least a substantial amount) has a higher carbon footprint in totality that FAR surpasses that of a single model. I do support further research in this area, but we must consider the harm us engineers cause when we write papers that can be manipulated so well by media to create click bait articles that only enable the mindset of “big tech is the actual problem” while individuals shift responsibility of their own carbon emissions onto others.

c4wrd··on The Growing Case for a Microsoft Azure Slowdown [pdf]
I found a lot of factual inaccuracies within this report which leads me to believe this either an attempt to tarnish the Azure brand or (as someone else pointed out) the author of this has invested in it’s competitors. For example, they state the following which is trivial to show as completely false:

> Amazon is already building an ecosystem around its own chips, while Microsoft has yet to deploy any custom chips in Azure.

c4wrd··on 5G Mobile Networks: A Systems Approach
Systems Theory is the study of complex concepts in which those concepts are broken down into a comprehensive set of smaller, interconnected components that make it easier to understand the complexity and implement. Not the best example, but you can think of it as a blueprint of sorts.
← PreviousPage 2 of 2