Git Product home page Git Product logo

lectures's People

Contributors

brianyu28 avatar dmalan avatar rongxin-liu avatar ronithalder16 avatar ummcheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lectures's Issues

sidebar on cs50 home site

Summary

Make the sidebar of the cs50/x course's home website to be collapsable

This is not a super critical issue, but thought to bring this small suggestion in your consideration.

Details:

  • Most of the times, I am working in a vertically split layout with cs50/x website on one half, and editor on the other.
  • In this layout, the sidebar of the cs50/x site takes up huge space, leaving very little space for the actual content of the page

Vertically split layout

Workarounds considered:

  • Browser's reader view:
  • Removing the sidebar from web browser's web inspector tool:

These both workarounds not suitable as these are:

  • Browser dependent,

  • Repetitive
    require redoing at every load of a page

  • Reduce the website's functionality
    content got omitted, commands not copyable etc in reader view or sidebar removal respectively in web-dev-tools hack

  • At best, are fiddly

So, having a built-in functionality to the site would be awesome.

Suggestion for sort

In the "CS50 2021/2022 - Lecture 3 - Algorithms" , in section of "Sort Race" at the end,
Order of running time came out to be: Merge sort < Selection sort < Bubble sort

  • Here, I think more cautionary light can be shed on why selection sort performed faster than bubble sort.
  • Similar to how the caution was shared at the end of "CS50 2021 Lecture" for the numerical imprecision.

With content something like given below:
(sorry, this ain't related to "Source code for CS50's lectures" ; but lectures... i couldn't think of other place to suggest this)


2:00:29 it's worth noting that

  • even though it seemed that selection sort is doing more steps (1:11:05), but it is actually performing faster than bubble sort!

why?

  • 'cz the actual steps selection sort is performing in inner loop take less time individually...
  • it's O(n) comparisons, but exactly one swap. so, O(1) swaps.

But in a single run of inner loop in bubble sort:

  • there were O(n) comparisons, as well as O(n) swaps.
  • So, that contributed to increased runtime of bubble sort
  • This is more getting into the weeds, but something you should be aware of while designing and analysing algorithms

Suggestion for `style50` usage in lectures with `less -r` pager in initial lectures too

Summary

Show style50 being used with a pager (like less) early on to ease its usage and uplift the UX.

I have been using this for quite some time now, and style50 becomes just sooooo much more pleasant to use when the output is controlled and scrollable like that.

$ style50 mario.c | less -r

the -r option here just ensures that the highlight stays there in the paged output as well.

Background & Details

I have know the ability to pipe (output of) commands to pagers like less or more on *nix systems, but i didn't made this suggestion earlier risking increased complexity.

But recently did Week 7 SQL, and saw more being used there (ref: 2023/22 Lecture 7: SQL at 13:45) as:

$ python favorites.py | more

... with accompanying phrase being very nice and abstracted "I have paused the output". So, as a pager is already used in the course, I would like to propose that it's usage be shown earlier as well while using style50 command due to aforementioned reasons.

speller (python version) ignores a 45-char word when checking

 # ignore alphabetical strings too long to be words
if index >= LENGTH:

If the text contains pneumonoultramicroscopicsilicovolcanoconiosis, index will be 45 (LENGTH) after reading the final 's' and the word is thrown away.

If you run ./speller large large you will see:

WORDS MISSPELLED:     0
WORDS IN DICTIONARY:  143091
WORDS IN TEXT:        143090   <<---- missing the longest word

Proposal

@dmalan Since GC in CS50.c is a washout version of Mark & Sweep algorithm, just sweep in this case, do you think it will be well suited if we introduce an exercise or a hacker edition psets on this topic? I think that it'll strengthen the understandings and usage of both structures and pointers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.