49 Matching Annotations
  1. Sep 2020
  2. Jun 2020
  3. May 2020
  4. Apr 2020
    1. If the word “share” doesn’t come out of your mouth, you don’t need to use a pointer

      key point

    2. The benefit of passing data “by value” is readability. The value you see in the function call is what is copied and received on the other side

      no hidden cost, eg., memory growth on the heap or pauses during garbage collection. but there is a cost in stack memory usage and "scoping" among multiple stack frames, CPU caching, etc.

    3. Functions execute within the scope of frame boundaries that provide an individual memory space for each respective function. Each frame allows a function to operate within their own context and also provides flow control. A function has direct access to the memory inside its frame, through the frame pointer, but access to memory outside its frame requires indirect access. For a function to access memory outside of its frame, that memory must be shared with the function.

      eg., shared via the "pointer" to an address in heap memory

  5. Dec 2019
  6. May 2019
    1. The first difficulty is that the robot’s utility function did not quite match our utility function. Our utility function is 1 if the cauldron is full, 0 if the cauldron is empty, −10 points to whatever the outcome was if the workshop has flooded, +0.2 points if it’s funny, −1,000 points (probably a bit more than that on this scale) if someone gets killed … and it just goes on and on and on.

      But it is very difficult to fully express these utility functions in code. The goal is to literally turn our ethics into code -- to translate them into coherent data structures, algorithms, and decision trees. We want to deduce our moral intuitions and more.

  7. Oct 2018
    1. Questions about the inclusivity of engineering and computer science departments have been going on for quite some time. Several current “innovations” coming out of these fields, many rooted in facial recognition, are indicative of how scientific racism has long been embedded in apparently neutral attempts to measure people — a “new” spin on age-old notions of phrenology and biological determinism, updated with digital capabilities.
  8. Mar 2018
    1. beenary code


      binary is anything with two and only two states, a code that is binary represents information using only these two states.

  9. Feb 2018
  10. Jan 2018
  11. Apr 2017
  12. Feb 2017
  13. Jan 2017
    1. In Python, as well as in any other object-oriented programming language, we define a class to be a description of what the data look like (the state) and what the data can do (the behavior). Classes are analogous to abstract data types because a user of a class only sees the state and behavior of a data item. Data items are called objects in the object-oriented paradigm. An object is an instance of a class.

      Class = General description of form and functions of data. Object = A member or instance of a class.

  14. Jul 2016
    1. Neil Fraser says Vietnam is doing well with computer science education.

      "If grade 5 students in Vietnam are performing at least on par with their grade 11 peers in the USA, what does grade 11 in Vietnam look like? I walked into a high school CS class, again without any advance notice. The class was working on the assignment below (partially translated by their teacher for my benefit afterwards). Given a data file describing a maze with diagonal walls, count the number of enclosed areas, and measure the size of the largest one."

  15. Jun 2016
    1. Civilization advances by extending the number of important operations we can perform without thinking about them.

      This sounds really similar to the concept of "abstraction".



  16. May 2016
  17. Apr 2016
    1. Great Principles of Computing<br> Peter J. Denning, Craig H. Martell

      This is a book about the whole of computing—its algorithms, architectures, and designs.

      Denning and Martell divide the great principles of computing into six categories: communication, computation, coordination, recollection, evaluation, and design.

      "Programmers have the largest impact when they are designers; otherwise, they are just coders for someone else's design."

  18. Feb 2016
  19. Jan 2016
    1. Discussion about Obama's computer science for K-12 initiative. CS programs in high school are about 40 years overdue. It is a valid concern that much of this money may be wasted on overpriced proprietary software, hardware, and training programs. And of course, average schools will handle CS about like they handle other subjects -- not very well.

      Another concern raised, and countered, is that more programmers will mean lower wages for programmers. But not everyone who studies CS in high school is going to become a programmer. And an increase in computer literacy may help increase the demand for programmers and technicians.

    1. educators and business leaders are increasingly recognizing that CS is a “new basic” skill necessary for economic opportunity. The President referenced his Computer Science for All Initiative, which provides $4 billion in funding for states and $100 million directly for districts in his upcoming budget; and invests more than $135 million beginning this year by the National Science Foundation and the Corporation for National and Community Service to support and train CS teachers.
    1. This has implications far beyond the cryptocurrency

      The concept of trust, in the sociological and economic sense, underlies exchange. In the 15th-17th centuries, the Dutch and English dominance of trade owed much to their early development of instruments of credit that allowed merchants to fund and later to insure commercial shipping without the exchange of hard currency, either silver or by physically transporting the currency of the realm. Credit worked because the English and Dutch economies trusted the issuers of credit.

      Francis Fukuyama, a philosopher and political economist at Stanford, wrote a book in 1995, Trust: The Social Virtues and the Creation of Prosperity, on the impact of cultures of trust on entrepreneurial growth. Countries of ‘low trust’ have close family culture who limit trust to relations: France, China, S. Italy. Countries of ‘high trust’ have greater ‘spontaneous sociability’ that encourages the formation of intermediate institutions between the state and the family, that encourage greater entrepreneurial growth: Germany, England, the U.S. – I own the book and (shame on me!) haven’t yet read it.

      I thought of this article in those contexts – of the general need for trusted institutions and the power they have in mediating an economy, and the fascinating questions raised when a new facilitator of trust is introduced.

      How do we trust? Across human history, how have we extended the social role of trust to institutions? If a new modality of trust comes available, how does that change institutional structures and correspondingly the power of individuals, of institutions. How would it change the friction to growth and to decline?

      Prior to reading this article, I had dismissed Bitcoin as a temporary aberration, mostly for criminal enterprises and malcontents. I still feel that way. But the underlying technology and it’s implications – now that’s interesting.

    1. Category Theory for the Sciences by David I. Spivak<br> Creative Commons Attribution-NonCommercial-ShareAlike 4.0<br> MIT Press.

  20. Dec 2015
    1. In 1980 Joachim Lambek showed that the types and programs used in computerscience form a specific kind of category. This provided a new semantics for talking aboutprograms, allowing people to investigate how programs combine and compose to createother programs, without caring about the specifics of implementation. Eugenio Moggibrought the category theoretic notion of monads into computer science to encapsulateideas that up to that point were considered outside the realm of such theory.
  21. Nov 2015
    1. “Many random number generators in use today are not very good. There is a tendency for people to avoid learning anything about such subroutines; quite often we find that some old method that is comparatively unsatisfactory has blindly been passed down from one programmer to another, and today’s users have no understanding of its limitations.”— Donald Knuth; The Art of Computer Programming, Volume 2.

      Mike Malone examines JavaScript's Math.random() in v8, argues that the algorithm used should be replaced, and suggests alternatives.

  22. Jun 2015
    1. There’s a scale for how to think about science. On one end there’s an attempt to solve deep, fundamental questions of nature; on the other is rote uninteresting procedure. There’s also a scale for creating products. On one end you find ambitious, important breakthroughs; on the other small, iterative updates. Plot those two things next to each other and you get a simple chart with four sections. Important science but no immediate practical use? That’s pure basic research — think Niels Bohr and his investigations into the nature of the atom. Not much science but huge practical implications? That’s pure applied research — think Thomas Edison grinding through thousands of materials before he lit upon the tungsten filament for the lightbulb.