<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Matthew Nagieb on Medium]]></title>
        <description><![CDATA[Stories by Matthew Nagieb on Medium]]></description>
        <link>https://medium.com/@matthewnagieb?source=rss-222526711a74------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1lYHhnCADgEGiLpa</url>
            <title>Stories by Matthew Nagieb on Medium</title>
            <link>https://medium.com/@matthewnagieb?source=rss-222526711a74------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 12:55:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@matthewnagieb/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[CS 373 Fall 2026: Matthew Nagieb— Blog #13]]></title>
            <link>https://medium.com/@matthewnagieb/cs-373-fall-2026-matthew-nagieb-blog-13-ca1e90fd3caf?source=rss-222526711a74------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca1e90fd3caf</guid>
            <dc:creator><![CDATA[Matthew Nagieb]]></dc:creator>
            <pubDate>Mon, 23 Nov 2026 02:02:39 GMT</pubDate>
            <atom:updated>2026-11-23T02:02:39.982Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzX9pOqt5KgTqb-JRET8wQ.jpeg" /></figure><p>Dr. Rich and Dr. Cline’s lectures made me think more about how software engineering decisions hold a huge ethical responsibility in society. Across the discussions of surveillance, outages, ethical frameworks, effective altruism, and AI, the concept that had me most intrigued was that technical progress can happen faster than our ability to decide what responsible use looks like.</p><p>The concept of a policy vacuum stuck with me the most. These lectures made me consider what happens when we build something before there are universally agreed upon ethical frameworks used in the decision making of our systems. A company might automate a task without having a clear answer about who is held responsible when the system makes a mistake. This changed how I think about how society agrees upon mostly subjective ideas about ethics. Having no universally agreed upon ethical framework makes such decisions difficult to overcome.</p><p>What did not work as well for me was moving between so many differing topics in a short amount of time. Kant, utilitarianism, and Rawls each approach a problem in different ways, but I would have better enjoyed spending more time comparing their answers to the same situation. I understood the differences better than I understood how to resolve a disagreement between them. I also wanted the discussion of AI and jobs to distinguish more clearly between automating individual tasks and replacing entire positions. Those possibilities have different consequences, especially for students preparing to enter the industry.</p><p>One realistic decision I might face as a software engineer is whether to implement detailed user tracking to help a team understand how people use an application. A utilitarian approach would ask whether the overall benefits outweigh the harms. Tracking could help identify confusing features, diagnose failures, and improve the product. However, it could also expose sensitive information or make users uncomfortable with how much the company knows about them.</p><p>Applying that framework would push me to collect only the information needed for a specific purpose, limit how long it is retained, and consider whether aggregated data would answer the same questions. The framework falls short when the benefits and harms are difficult to compare. A small convenience for thousands of users might appear to outweigh a serious privacy risk for a few people. That makes me hesitant to rely on total benefit alone without also considering individual rights.</p><p>If I were teaching these lectures next year, I would cut some of the breadth and add one extended case study. For example, students could decide whether to release an AI feature that performs well overall but makes more mistakes for a particular group of users. We could apply each framework, defend different decisions, and then reconsider after learning about business pressure or potential harm. That would make the frameworks feel more practical and show why responsible engineering involves judgment, not just knowing the names of ethical theories.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca1e90fd3caf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CS 373 Fall 2026: Matthew Nagieb — Blog 12]]></title>
            <link>https://medium.com/@matthewnagieb/cs-373-fall-2026-matthew-nagieb-blog-12-1999f9ce5d00?source=rss-222526711a74------2</link>
            <guid isPermaLink="false">https://medium.com/p/1999f9ce5d00</guid>
            <dc:creator><![CDATA[Matthew Nagieb]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 02:23:44 GMT</pubDate>
            <atom:updated>2026-11-16T02:23:44.173Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzX9pOqt5KgTqb-JRET8wQ.jpeg" /></figure><p>This week, we covered the Observer and Strategy patterns, method overriding, abstract classes, abstract methods, and interfaces. We also read “Why Extends Is Evil” and worked on IDB3. The biggest connection for me was understanding how the way we organize code affects how easily we can change it later.</p><p>The Strategy pattern helped interfaces click for me. An interface can initially feel like an extra step because you declare methods and then still have to implement them somewhere else. However, Strategy gives that separation a clear purpose. A class can depend on an interface while different implementations provide different behaviors. Instead of constantly modifying the class whenever a new behavior is needed, we can supply another implementation. That made interfaces feel more useful than just a requirement for an exercise.</p><p>Observer helped me think about dependencies from another direction. A subject can notify its observers without needing to know the details of what each observer does. One concrete detail that stood out was that having the right methods is not enough in Java: a class must explicitly implement the interface to be used as that interface’s type. That distinction helped connect the design pattern to the compiler errors we encounter when implementing it.</p><p>The collaborative quizzes made me think about the difference between recognizing a concept and being able to explain it. Looking at an example of overriding can feel straightforward, but predicting which method runs requires more careful reasoning. I still want more practice separating the declared type of a reference from the actual type of the object. The method-overriding examples reinforced that I need to trace the behavior instead of relying on what looks obvious.</p><p>The paper also made me reconsider inheritance as the default approach to sharing code. My takeaway was that inheritance creates a relationship that can become difficult to change as a project grows. Composition gives us another way to reuse behavior while keeping responsibilities separate. In a real project, that matters because requirements rarely stay exactly the same.</p><p>Working with AI raises a similar issue about making design decisions explicit. Producing DESIGN.md and CRITERIA.md pushes me to explain what I want before focusing on implementation. The useful part is turning a vague goal into behavior that someone else could understand and evaluate. The challenging part is recognizing when an AI response sounds complete but still leaves important decisions unresolved.</p><p>I also think generated tests require their own review. Passing tests only provides confidence if the tests represent the requirements accurately. If the implementation and the tests share the same misunderstanding, they can agree with each other while still producing the wrong result. This makes reviewing the criteria just as important as reviewing the code.</p><p>My biggest takeaway is that ownership involves being able to explain and defend the finished project’s decisions. AI can help produce code, but I still need to understand why it works and where it could fail.</p><p>My tip of the week is to write one concrete input and expected output for each requirement before implementing it. Include an edge case, such as empty data or an invalid value. This is a simple way to make both human-written and AI-generated code easier to evaluate.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1999f9ce5d00" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CS 373 Fall 2026 Blog #11: Matthew Nagieb]]></title>
            <link>https://medium.com/@matthewnagieb/cs-373-fall-2026-blog-11-matthew-nagieb-e18cbc20d594?source=rss-222526711a74------2</link>
            <guid isPermaLink="false">https://medium.com/p/e18cbc20d594</guid>
            <dc:creator><![CDATA[Matthew Nagieb]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 00:58:01 GMT</pubDate>
            <atom:updated>2026-11-09T00:58:01.569Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzX9pOqt5KgTqb-JRET8wQ.jpeg" /></figure><p>Several facets of software engineering came together for me this week. I have been working with data via joins and subqueries, considering object design in the form of Singleton and inheritance, and putting my head to an optimization problem with Knapsack. What I found was a common thread: the hard part is not merely arriving at an answer but knowing how to put the solution together and make a case for why it works.</p><p>Of the lot, Knapsack was the most demanding. On the face of it the problem is simple enough: pick the best mix of items without going over on weight. But taking the most valuable item first will not necessarily give you the optimal combination, so one cannot rely on a greedy approach as with some other problems.</p><p>To get a handle on the solution I went about it by making a decision for each item in turn. Either you leave it or, if there is room, you put it in. I found the recurrence easier to follow if I thought of the dynamic programming table as representing the best value to be had from the given capacity and items, rather than just a set of figures. Each entry then answers a particular question.</p><p>Then there is the matter of the Kattis problem which wants the indices of the items you have chosen, not only the maximum value. The optimal value is only half the story. One has to work back through the table to put the choices back together; a difference in value from the row above indicates the item was taken and its weight must be removed from what is left. A good lesson in reading the output requirements before pronouncing an algorithm done.</p><p>The use of joins and subqueries has given me pause to consider how I frame a problem before I start coding. A join is for related rows, a subquery can stand in for a condition or intermediate result. My syntax is no issue, though I would do well to practice foreseeing the exact rows a query will yield when a relationship has more than one match.</p><p>On the subject of getters and setters, I was left with a wider design question: if other code is free to read and alter a field, is calling it private any real encapsulation? It is better to build methods around the object’s function. In a project that would see to it that validation and business rules are kept in one place and not dispersed to every caller.</p><p>Inheritance is along those lines, as with the Shapes example where a common interface allows for different responses to the same operation. With Singleton, the way an object is made has an impact on the rest of the program. I should like to be more adept at telling when a pattern is solving something and when it is just adding complexity.</p><p>My advice for the week is to put pen to paper and run through a small example before you debug anything of size. With Knapsack, three items and a little capacity will show you how the table is altered and how the items are recovered far better than an accepted result does. That is a truer test of whether I understand it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e18cbc20d594" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CS 373 Fall 2026: Matthew Nagieb — Blog #10]]></title>
            <link>https://medium.com/@matthewnagieb/cs-373-fall-2026-matthew-nagieb-blog-10-05c43a8f6406?source=rss-222526711a74------2</link>
            <guid isPermaLink="false">https://medium.com/p/05c43a8f6406</guid>
            <dc:creator><![CDATA[Matthew Nagieb]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 02:18:59 GMT</pubDate>
            <atom:updated>2026-11-02T02:18:59.828Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzX9pOqt5KgTqb-JRET8wQ.jpeg" /></figure><p>The work this week has allowed me to make the link between our Python exercises and the database operations they stand for. We have gone over Natural Join, SQL Select, setting up a database, data insertion and SQL functions. What really made sense to me was the amount of work a brief SQL statement can convey. In Python one has to put in the effort to write loops, test conditions and build the result. With SQL you simply describe what you want and let the database handle the execution.</p><p>Natural Join put column names in a different light for me. It is handy that matching columns are automatic but they do dictate how the query behaves. The fact that two columns share a name does not mean they are the same relationship. That is a good reason to know the data structure as well as the syntax.</p><p>I have found a way to measure my grasp of the SQL material: can I tell what rows a query will produce before I run it? It is simpler to recognize what a statement is doing than to follow its result in detail. Once we moved from making tables to inserting and selecting values the commands felt like part of a process rather than examples to be put to memory.</p><p>The Increasing Subsequence problem was of particular interest since determining the length was only half of it. We had to come up with the lexicographically first of the longest valid sequences. Take `3, 1, 2, 5, 4` for instance; while `1, 2, 5` and `1, 2, 4` are both of length three, the latter is first. A solution that turns up any longest sequence would be incorrect.</p><p>It was easier to think through by posing two questions: what is the maximum length and which options give the earliest sequence at that length? The second one requires some justification for a greedy choice. One might pick a small value but only if there are enough larger ones to follow. Small examples were better at showing that than reading the problem as a whole.</p><p>The talk on getters and setters put forward a similar issue with surface level correctness. Private fields and public access methods are fine encapsulation on paper but other code can be too reliant on an object’s internals. I am more inclined to expose meaningful operations. A `withdraw(amount)` method states intent and puts rules in place that a `setBalance(value)` cannot. On a project those interface calls make the difference in how readily the software can be altered.</p><p>My advice for the week is to use very small examples to sort out any ambiguity in a requirement. For Increasing Subsequence I would put in duplicates, a decreasing input or more than one answer of equal length. A five element case chosen with care will show more than a random large test because I can say why the answer is right.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=05c43a8f6406" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CS 373 Fall 2026 Blog #9: Matthew Nagieb]]></title>
            <link>https://medium.com/@matthewnagieb/cs-373-fall-2026-blog-9-matthew-nagieb-b40a3e2666c1?source=rss-222526711a74------2</link>
            <guid isPermaLink="false">https://medium.com/p/b40a3e2666c1</guid>
            <dc:creator><![CDATA[Matthew Nagieb]]></dc:creator>
            <pubDate>Mon, 26 Oct 2026 00:13:04 GMT</pubDate>
            <atom:updated>2026-10-26T00:13:04.528Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzX9pOqt5KgTqb-JRET8wQ.jpeg" /></figure><p>We have been through a good deal in Software Engineering this week: Select, Project and Cross Join, IDB2, not to mention Dependency Inversion. Of all of it the distinction between an iterator and an iterable is what has made the most sense to me. The exercises may be brief on paper but one has to put some thought into them to get the behavior as it should be.</p><p>Take my initial foray into Select for instance. I had `__iter__` give back an iterator from the input and `__next__` would in turn call `next(self)`. It only took running those lines to see there were issues with that approach; `next(self)` was going to call itself over and over and the filtering could be side stepped. One has to know where the iteration state resides to put it right, and in doing so you come to appreciate the gulf between running a couple of examples and truly grasping an implementation.</p><p>There is something about Project and Cross Join that takes this a step further. You cannot rely on indexing or any other container, so you are left to watch how values are handled by the operation. With Cross Join in particular I found myself considering if an input can be re traversed once the iterator is spent.</p><p>Then there is Dependency Inversion which puts these exercises in the context of a bigger design. What I have taken from it is that your application logic ought to be built on abstractions and not be wedded to a given implementation. Put it in terms of IDB2 and the tie up between the data sources and the application at large seems all the more significant; you do not want to have to go back and rewrite everything because of a change in the way data is pulled.</p><p>Dealing with AI has shown me how plausible code can mask a misapprehension. I am more inclined to value an explanation if I can put it to a line of code or work through an example on my own. As for DESIGN.md and CRITERIA.md, the question becomes if the requirements are unambiguous enough to judge what has been generated. The same goes for tests produced by AI, they have to be looked at closely since matching the code does not mean the behaviour is correct if both are in error.</p><p>I like to be able to stand behind the final decisions and understand them. There is no substitute for the practice of putting something down by hand, but then again reviewing what the AI has done calls for its own kind of focus.</p><p>If I were to offer a word of advice for the week, it is to put some trust in an iterator implementation only after you have traced an empty input and an exhausted one by hand.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b40a3e2666c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CS 373 Fall 2026: Matthew Nagieb— Blog 8]]></title>
            <link>https://medium.com/@matthewnagieb/cs-373-fall-2026-matthew-nagieb-blog-8-6467c5ca2e64?source=rss-222526711a74------2</link>
            <guid isPermaLink="false">https://medium.com/p/6467c5ca2e64</guid>
            <dc:creator><![CDATA[Matthew Nagieb]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 02:19:23 GMT</pubDate>
            <atom:updated>2026-10-19T02:19:23.551Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzX9pOqt5KgTqb-JRET8wQ.jpeg" /></figure><p>This week really solidified the difference between recognizing Python syntax and being able to actually use it when under pressure to write code for Test #1. My scores on the coding part did not reflect how I felt before taking the test, and it will take me a number of attempts to write correct code to problems after having gone through explanations of how to do them. I will spend a lot of time practicing making up my own problems and tracing out unfamiliar code to implement given solutions.</p><p>Ask Marilyn was a good example of how I tried to simplify the problem first by always choosing door A and then later introducing randomness to the choices. My main problem with the problem was translating the given reasoning into consistent behavior for all possible cases, keeping track of the choice made before asking for Marilyn’s response and the door she chose to reveal.</p><p>I need to be aware of how Python treats input. An input value is always a string and in an if-statement, we test for the meaning of a value, which is always true for non-empty strings, even when they represent negative responses to questions.</p><p>The different methods are also helpful to categorise the different functions. As you mentioned before, instance methods are used for a certain instance, class methods are called with the class as parameter and static methods don’t need any parameter because they are static.</p><p>Interface Segregation (on p. 7) goes on to apply this principle to software design. The main point is that an interface should provide the operations that the clients using that interface actually need, without forcing them to depend on other, possibly unrelated, stuff. (In a team project, this would help to make your code easier to modify, since fewer other components would need to be changed as a result of any given change.)</p><p>My tip of the week is for you to make a tiny trace table before running your test case. Just making a tiny trace table for the variables, for their types, and then for how their values change in each step of the trace for an interactive problem like this will help you to find your mistaken assumption much more quickly than making change after change to your code, hoping that the next version will pass all of the test cases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6467c5ca2e64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CS 373 Fall 2026: Matthew Nagieb — Blog 6]]></title>
            <link>https://medium.com/@matthewnagieb/cs-373-fall-2026-matthew-nagieb-blog-6-4b1d0a74fe14?source=rss-222526711a74------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b1d0a74fe14</guid>
            <dc:creator><![CDATA[Matthew Nagieb]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 04:20:01 GMT</pubDate>
            <atom:updated>2026-10-05T04:20:01.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzX9pOqt5KgTqb-JRET8wQ.jpeg" /></figure><p>I finally have a grip on how Python generators work! At first, I thought `yield` was some kind of way to return values from a function, but no, `yield` is actually a way to return values from a function that can produce multiple values. Unlike return, however, `yield` does not terminate execution of the function. Instead, `yield` suspends the execution of the function and returns control to the caller. The function can then resume where it left off the next time that `yield` is called. One gotcha that I encountered is that `list(f())` twice is different from consuming the same generator twice, i.e., `list(f())`; list(f())` (after f() has been exhausted). The first creates two separate generators, the second tries to create a list from an already exhausted generator and results in an empty list.</p><p>Comprehensions, functions and decorators all connected up in unexpected ways for me. As mentioned above, comprehensions can make very pretty transformations and filters but it’s still often valuable to translate them into ‘normal’ loops for some reason. Functions can be passed around and returned from other functions and this makes sense when thinking of a decorator as a function that wraps around another function in some way. As ever, I need to practice tracing the execution of such a function and working out what will be returned when.</p><p>Collaborative quizzes are also useful to make sure you can really recognize short Python code snippets and explain to someone else why you think the output of a short Python program is what it is. Most often, my reasoning for a short program will differ from that of others on the team, but going through the short program step by step makes more sense for figuring out the problem than just comparing answers.</p><p>It’s also really reinforced for me the value of taking a few minutes to list out the input constraints and potential edge cases of a problem before starting to write code. Even if the question isn’t fully answered, having a good sense of what information the solution is going to need to track can save a lot of time in debugging.</p><p>Another concept that has “clicked” for me recently is the Open–Closed Principle which again relates to our IDB1 project RoboticsAccess. When connecting together teams, events and countries within the website of RoboticsAccess it is important to design a shared structure which is open to extension but closed to modification. Thus when adding a new data source or trying to implement some new behavior it should be possible to extend the software without having to modify all other components that are using the same information.</p><p>Working on IDB1 really highlighted the importance of coordinating the various different parts of a project. Working on IDB1 has also shown me that software engineering is as much about communicating decisions to other people as it is about writing code.</p><p>My Tip of the Week. To get a better grasp of small programs (also known as “small programs”), predict the output of the program before actually running it. Writing down your prediction first, tracing the execution of the program to the output, and then comparing your prediction to the actual output will reveal any misunderstanding you may have had of specific features such as generators and decorators.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b1d0a74fe14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CS 373 Fall 2026: Matthew Nagieb-Blog #4]]></title>
            <link>https://medium.com/@matthewnagieb/cs-373-fall-2026-matthew-nagieb-blog-4-1403986a081a?source=rss-222526711a74------2</link>
            <guid isPermaLink="false">https://medium.com/p/1403986a081a</guid>
            <dc:creator><![CDATA[Matthew Nagieb]]></dc:creator>
            <pubDate>Tue, 22 Sep 2026 03:38:28 GMT</pubDate>
            <atom:updated>2026-09-22T03:38:28.970Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzX9pOqt5KgTqb-JRET8wQ.jpeg" /></figure><p>The connection to teamwork and software engineering for this week’s Python exercises was helpful. I covered a number of concepts including Exercise #3 reduce, Paper #4 on pair programming, Problem #3 on Collatz for programming, running Factorial.py, completing assignment, learning about unpacking in Python, reviewing CATME and looking more closely at Project #2: IDB1 for our software engineering class. More specifically this week the key thing for me that connected to software engineering was to be able to understand a piece of code and to be able to explain it to someone else and specifically the steps that a short piece of code may mask.</p><p>The concept that I finally got to click was reduce. At first reduce seemed much harder than a simple loop, because a single expression is hiding a lot of steps. However, a loop is only a special case of reduce, where you’re repeatedly combining an accumulated result with the next item in the list. For example, the factorial of a number can be thought of as starting with 1, and repeatedly multiplying by the next number. Once I saw that, reduce became much easier to follow.</p><p>My only comment on assignment and on unpacking is that I would like to be better at guessing what a short piece of Python code does before running it to see the results of its execution. A short piece of code often consists of multiple values, and their assignment to the various variables that appear in the expression is usually more important to understand than the expression itself.</p><p>Collaborative quizzes are very effective for helping to understand code. It takes a lot more to explain why you chose a particular answer than it does to simply choose the answer. Seeing how another person worked out a problem can help you to realize a step that you had missed even though you thought you had a good grasp of the material. This helps to understand how to trace through unfamiliar code.</p><p>Collatz sequences, programming challenges under time constraints: The main thing I got from this assignment was that first you have to get a clear solution working, and then you can start to optimize it. It is very tempting to just start typing code as soon as you read the assignment, but it is worth the time to clarify the stopping test for the sequence for n&gt;1 (i.e., what is the next number in the sequence for n&gt;1) and to test out a very small example case first.</p><p>My understanding of collaboration in software development grew while completing pair programming exercises for Paper #4, as well as while reading CATME and Project #2: IDB1. Understanding how to contribute, keep teammates up-to-date on progress, and complete quality work for collaborative projects is important to becoming a better software engineer.</p><p>When you start to see that even seemingly compact expressions can be untangled into individual steps, then a lot more makes sense. This is what I learned about reduce.</p><p>Just a thought… Rather than typing code and running it before you understand it better, create a small trace table before running code that you are not sure about. You can then trace through the results of the execution for reduce, loops, etc. This also helps you to explain why an answer is correct for things such as a Collatz sequence or factorial of a number.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1403986a081a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CS 373 Fall 2026: Matthew Nagieb— Blog #3]]></title>
            <link>https://medium.com/@matthewnagieb/cs-373-fall-2026-matthew-nagieb-blog-3-e2c6b02aebed?source=rss-222526711a74------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2c6b02aebed</guid>
            <dc:creator><![CDATA[Matthew Nagieb]]></dc:creator>
            <pubDate>Sun, 13 Sep 2026 23:04:57 GMT</pubDate>
            <atom:updated>2026-09-13T23:04:57.925Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzX9pOqt5KgTqb-JRET8wQ.jpeg" /></figure><p>This week I finally got to see behind the scenes of what is happening in Python. We went through a few topics including exceptions, lists, tuples, sets and equality. Most of these have been previously covered, but now I know the full ins and outs of how they work, and how to actually explain how the code you have written behaves.</p><p>The connection between `is` and `==` really clicked this week for me. So in the past I kind of had thought of both `is` and `==` as ways to check if two things were the same. However this week we learned that `==` actually checks for equality and `is` checks to see if two references point to the same object. This means that two separate lists even with identical elements would not be considered the same. Learning about the `__eq__` method of classes was also very helpful in this area because it makes it clear that when you compare two objects using `==` you are actually calling that objects `__eq__` method and therefore you can define what equality means for that objects in your class.</p><p>The collaborative quizzes in class also helped me to get a better grip on how to implement the exceptions in the code. The way you can trace back in the code where the execution stopped and which handler would get called was also very helpful. The way an exception handler for a parent class can also be used to catch exceptions of its child-classes as well was very interesting and helped me to understand that the order of the exception handlers is important.</p><p>Iteration in Python also works as I expected and was pointed out in the exercises for “for loops”. That the “for loop” is handled by the `__iter__()` and `__next__()` methods of an object’s class and that `StopIteration` is raised by the `__next__()` method of an iterator to signal the end of iteration of an iterable, helps to broaden my perspective of the use of exceptions in Python beyond error handling.</p><p>The programming challenge revealed to me how I currently tackle problems: i go straight to coding. My solution will probably need to be refactored (because i haven’t fully considered the problem and therefore created a less-than-ideal solution). So my main thing to remember is to think through the problem a bit more before i start coding. Perhaps working out an example case would help.</p><p>I also want to keep thinking about the individual coding decisions we make as programmers and how they affect others who may have to work with the code that we write for future projects and purposes. For this week’s assigned reading in the textbook, understanding the aspects of exception handling, choices of data structures for storing collections of information, and equality behavior for objects created in programs was very important to making programs more understandable.</p><p>One simple trick to remember all this is to write a small test program. Predict what the program will print out and then run it and write down any differences from your prediction. For example, testing whether two lists created separately are the same using “is” and “==” or testing exception handlers in a different order can be very instructive to understand where you went wrong.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2c6b02aebed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CS 373 Fall 2026, Blog 2: Matthew Nagieb]]></title>
            <link>https://medium.com/@matthewnagieb/cs-373-fall-2026-blog-2-matthew-nagieb-90ba8a392707?source=rss-222526711a74------2</link>
            <guid isPermaLink="false">https://medium.com/p/90ba8a392707</guid>
            <dc:creator><![CDATA[Matthew Nagieb]]></dc:creator>
            <pubDate>Sun, 06 Sep 2026 23:00:25 GMT</pubDate>
            <atom:updated>2026-09-06T23:00:25.345Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzX9pOqt5KgTqb-JRET8wQ.jpeg" /></figure><p>This week in course covered the writing of reliable software. We looked at IsPrime, Divisor Counts, Docker, assertions, unit tests, coverage, and exceptions. It takes more than getting code to run. I need to understand how it works and be able to test it too.</p><p>Understanding testing and coverage for code was a big concept for me this week. I see that passing a test does not always guarantee that all important scenarios are being covered for a piece of code. Also, coverage doesn’t guarantee correctness either. To help solidify this in my head, we reviewed unit testing and went over examples for different levels of coverage. I can see now why choosing good test cases is important.</p><p>As we went through the collaborative quizzes for this week’s material, I had to think even more deeply about my answers and, as a result, found that explaining my answer to another person is very different from simply choosing from a list of options. At times, I feel like I fully understand a concept until I am forced to explain how or why something works. These “explanations” have greatly helped me to solidify my grasp of some concepts (e.g. assertions and exceptions).</p><p>For Divisor Counts, I had initially thought solving under time pressure would require me to type faster and write more code. But it really requires the opposite — initial slowdown to carefully read the prompt, develop a plan, verify on a small test case, and then start writing. I hope to continue to work on being able to quickly come up with a plan to solve a problem before starting to code.</p><p>A more relevant reading of the course’s Home Page was the outline of the sorts of habits one needs to be a dependable software engineer: preparation, communication, consistent effort, and more. I see this course as a way to hone up these habits as I am being taught the specific technical material as well.</p><p>A big revelation I had this week was realizing that even seemingly simple programs (like IsPrime) can require so much attention to be considering edge cases. And in particular, the values of zero, one and two force you to consider cases that might not otherwise occur to you. This is especially relevant when considering testing too. Very small examples can reveal flaws in your program that would not be evident using more typical examples of input.</p><p>Docker is really cool in that it allows for the creation of a constant, repeatable environment. This makes collaboration much simpler.</p><p>Write down a few edge cases before coding. These should be the smallest valid input, some unusual input and some normal input for you. It will give you a good starting point for what to test for when you have finished coding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90ba8a392707" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>