CSTA 2018 - Funding and Direction

In addition to everything I wrote about last time there were a couple of other big announcements at this year's CSTA conference. Both announcements deal with funding.

First, there is a new class of CSTA membership. The free tier remains but now for $50 you can join CSTA+. This new level of membership comes with a bunch of extras that are probably good for K12 teachers but I doubt I'll use any of them. I did, however, get a snazzy CSTA+ water bottle by joining at the conference. For me the interesting part is that 50% of CSTA+ dues will go to support local chapters.

I don't exactly know what that means but it's what got me to join. Ultimately, local teaching communities are important and CSTA+ supports that, I'm all in.

That said, what do chapters do? I know what goes on in NY but not elsewhere. I bet the same is true for people all over the country. One question that came up repeatedly at the conference, at least in my circles was "what would the chapters use the money for?" I think it would be wonderful if on the CSTA web site there was a page where chapters could easily list activities funded by the central organization. I'm not looking for a big write up - who has time to read or write that. I'm looking for a line or two. What the chapter did and maybe a few comments on details. Over time this could be a great way for chapters to steal ideas from each other.

The other piece of big news was Microsoft pledging a big chunk of change to the CSTA. I've often lamented that so many CS Education (and education decisions in general) are decided by everyone except the teachers. The CSTA is our teacher's professional organization and our best bet for teacher representation when policy is made and implemented. Once again it appears that some of these funds will help support local chapters.

The Microsoft funding though got me thinking. The linked piece talks about advocacy, professional development and curriculum. All important but there's an even greater need right around the corner. We need quality, qualified CS teachers and we need them now. Taking a teacher with no CS background and giving them some PD can be a stop gap but it isn't a solution. Long term we need pre and in service teacher preparation programs similar to what we're rolling out at Hunter. Programs that include both pedagogy and content. As states begin to require these programs, as they do in all other subject areas, teachers both new and in service will have to take a number of graduate credits. In our case, 18 for a certificate for an already licensed teacher and our MA program is somewhere in the 30s.

I'd love to see money allocated to pay for CS teacher certification through our public colleges as they (we) roll out programs.

This said, the Microsoft commitment is great news for the CSTA and CSTA is a great option for teachers that can afford it.

Here in NY, our CSTA chapter is fairly young. I'm excited to see what this year brings both on the local and national level.

Csta 2018 Report

I just got back from the CSTA (Computer Science Teacher's Association) conference. It's the biggest annual conference dedicated to K12 CS education. I think there were about 700 people attending. It felt much larger than last year but compared to SIGCSE which is double the size, CSTA still felt pretty intimate.

The conference was in Omaha Devorah came along to play tourist and we both came a day early to do some site seeing.

First, we hit the zoo and Lauritzen Gardens. We've got the Bronx Zoo here in NY an the NY and Brooklyn Botanical Gardens which are all pretty impressive but even so, Omaha's zoo and gardens are well worth a visit. We then went over to the Durham Museum which was really terrific. Housed in an old railroad station, the museum has lots of great Omaha history as well as trains and other neat exhibits.

We also walked all over and did our best to pick up on the local flavor. One of our discoveries was a terrifically quirky retro/nostalgia/antiques store. It had an awesome working Pinball museum

pinball.jpg

along with all the rubber ducks you'd ever want for debugging

ducks.jpg

and a whole lot more.

By the river, we found both a statue and series of plaques honoring labor:

labor.jpg

something I'm thinking a lot about now in light of the recent Janus decision.

As for the conference. It was 100% worth it.

I spent a lot of time at the GitHub booth with my new friend John talking about how I use GitHub with my classes.

git.jpg

and as always one of the highlights was spending time with old friends and making new friends while talking shop.

I also gave a talk on the state of CS teacher certification in New York State and what we're rolling out at Hunter. that led to discussions with people from all over. Texas, California, Indiana, and other places. We had some great discussions as to what's going on all over the country. I also had a chance to talk to teachers from all over NY State to let them know how Hunter can help them.

There were also interesting sessions. I attended a BOF facilitated by Todd Lash and others about mapping model lessons to CS standards. I'm actually not a fan of "the standards" and have some serious concerns about how standards are thrown around and used but it was a very interesting session nonetheless.

I also enjoyed a session by Owen Astrachan on teaching sorting. Owen gives a great talk. I didn't agree with some of how he approaches teaching sorting but then we teach different classes and students and could have slightly different goals leading to my view. In any case, it was very interesting and I plan on stealing the motivation he used. Owen started with a list of top hits - their titles and artist names and had us perform some mini data mining exercises on them in a spreadsheet to motivate the concept of sorting.

Probably the highlight of the conference for me was Michelle Friend's keynote. She had me as soon as she encouraged us to question the value of a lot of the education research out there. It got better when she reminded the audience of teachers that they were all education researchers. they perform their practice every day, analyze the results, and work to improve. So often, I hear education researchers dismiss teachers - "that's just anecdotal" they say while they publish the "true way" while ignoring the thousands of complex factors that actually affect education. There is some research that's great and some researchers I greatly respect but I've been forced to read enough bunk and there's been enough nonsense forced upon teachers over the years that just doesn't work in practice that a healthy dose of skepticism is critical.

Michelle also talked about assessment and how we test "what we can" rather than what we should.

It wasn't a talk from on high but I think it's what the audience needed - a talk from someone who's currently an academic but who at her core, I think is a teacher. It was teacher to teacher and that's what, at least in my opinion CSTA should be about.

A final highlight for me was when they awarded the Cutler Bell price for high school students. I knew that Benjamin Spector & Michael Truell were winners but I didn't realize they'd be at the conference to receive their award for their work creating Halite. I had helped them a bit along the way so knew the quality and impact of the project and it was great to see Ben and Mike recognized and to be there to be able to congratulate them in person.

Now it's back home and back to reality. The organizing committee really outdid themselves this year. Great job on CSTA 2018. I'm already looking forward to next year.

I'm not going to congratulate you on your AP results

While busy finishing off my sides for my talk at CSTA2018 this weekend I noticed a Facebook post about APCS exam grades now or shortly being available.

I'm no longer teaching high school but still fancy myself a teacher first and part of the K12CS community. We're a growing community and we're growing fast.

Usually, at this time of year we see a number of people posting their results. "I had 16 test takers, had 5 fives, 6 fours etc."

I decided that not only won't I be congratulating anyone on their results this year but decided to write this quick post to say no one should.

I'm not saying that hundreds of teachers out there don't deserve congratulations - they do. The problem is, for everyone who's kids got all fours and fives, somewhere out there was a teacher who possibly through no fault of their own had students scoring ones, twos and threes.

When I was at Stuy, almost all of my kids got fours or fives when the exam was the old AB exam. When it went to A only, it was almost exclusively fives with a few fours and maybe a single one. That wasn't me. It was the kids. The AP CS teacher before me got similar results as did all of my colleagues and the teachers who are still there. Again, it was the kids.

That's not to say that I didn't add value. I know I spent a career at Stuy doing right by those kids regardless of test scores.

The fact is that there's only so much a teacher can do.

  • Was APCS (A or principles) their first course?
  • What other demands are placed on the students?
  • How about the teacher?
  • How many kids in a class? How much time?
  • Is APCS an elective or required??
  • Is the teacher getting the support they need?

And the list goes on. I know some great teachers who never had classes with great AP results and meh teachers that did. Actually, I know some APCS and Calc teachers that consistently had classes with good scores through drill and kill and building student speed. Of course, at the same time these teachers totally turned the kids off from the subjects

Our teachers do deserve praise and congratulations.

  • Praise for getting through another year.
  • Praise for forging a path in this new subject area.
  • Praise for doing more with less.
  • Praise for inspiring kids and starting them on a path.
  • Praise for changing lives for the better.
  • And so on

If your kids left with more than they came in with you did a great job and deserve congratulations. If you set a seed that will later grow you've done an enormous amount of good.

It's like I would always tell my kids when they won an award. I was never proud of them actually winning the award. I was proud of how they carried themselves, prepared, performed or whatever. The award was just some outsider also noticing they're awesome.

Same thing here so I won't be congratulating teachers on student test results. The results coming in do provide some measure of closure for the year though so I will congratulate you all on the year and your work.

Hope to see many of you this weekend at CSTA2018.

Certification The Old Way

I've taken part in a few conversations and read more than a few threads on teacher certification exams recently. Specifically, CS teacher certification exams. There are a bunch of them floating around. There's the Praxis offered by ETS, the one from the National Evaluation Series, the Washington Evaluator Test Series one and then there's what's going on in Texas. NY State says it will eventually develop their own.

I have mixed feelings about exams like these. From what I've seen some of the content seems fine and the "stuff you have to know for the test" isn't necessarily the worst in the world. As a one time gatekeeper, I'm not necessarily happy with them but they can provide a test for a basic threshold of knowledge with out too much focus on test prep.

Of course, they're just the tip of the iceberg, many states including New York make their teacher candidates also take other exams. In NY candidates must take the edTPA which is expensive for the teacher candidate but a big money maker for Pearsons.

All of this came out of NCLB back in the day which also created requirements like "must complete an approved program" as opposed to just accruing a bunch of relevant education and content credits which in turn led to more courses like Math for Math Teachers.

For you youngsters out there (which I guess is most of you), I thought I'd share what it was like back in the day.

Back then, New York City certified it's own teachers as opposed to now when everything's done directly through the state. The system was, in my opinion far superior.

I came in as a career changer - I was doing computer work at the time - and I came in as a math teacher since there was no CS. Since math was an area of need it was a little easier for me to get my foot in the door than it would have been for say an English teacher.

To start I went down to the Board of Education in Brooklyn armed with my college transcript and waited in line. I then met with someone who evaluated my transcript. Normally, to get started, I would have needed a certain number of education credits and a certain number of content (math) credits. I think the magic number was 24 for the content. Since math was an area of needed you could get started with a TPD license (Temporary Per Diem) which required no education credits going in. You had to get 18 graduate education credits within the first, I think two years and take the National Teacher Exam. You also got one period off to be mentored which was a pretty sweet deal. Of course it wouldn't be that simple. I only had 16 math credits so fell short but the evaluator decided to give me credit for a couple of my more mathy CS classes like Algorithms to get me over the hump.

I then went to another line to get a brief mini physical and at some point I was fingerprinted and I had my TPD. The BOE then ran a one week "learn to teach" bootcamp and I was left to find my own job which I was fortunately able to do.

So, I had my foot in the door but as a TPD I had no job protections. I was observed at least 6 times a year and could be fired at will. In fact, TPD's were annually given pink slips in the spring and had to be rehired again in the Fall if their schools wanted them.

I got my 18 education credits over the next two years and took the NTE which was both the easiest and hardest exam I ever had to take. Easiest content wise but hard because it was a FULL DAY of non stop writing and my hand was cramped up into a club by days end. That got me to the next level - the PPT - Preparatory Provisional License, I think. This allowed me to be appointed. Once appointed you had job retention and seniority rights. Not tenure, but a step closer and you did get some legit job protections. If you started the process with education credits to go along with content credits you could have started directly with the PPT.

The final step to get that appointment with the PPT is that you had to go for an interview with the Board of Examiners. This was the good part. After work one day I went down to Brooklyn Tech, waited my turn and then was ushered into a classroom. A typical panel would have a principal, an assistant principal in your subject area, and a couple of teachers, again in your subject area. They could grill you on anything they wanted.

They could ask you general teaching questions (usually cached in a scenario):

  • how do yo u handle a mixed level class,
  • how do you handle a disruptive student

Preparation questions:

  • how would you motivate a class on the Pythagorean Theorem?
  • How would you turn a lesson on solving quadratics in to a hands on lab experience?

or content questions:

  • solve this calculus problem…
  • Derive this theorem…

I don't remember how long the session lasted but afterwards I left and a couple of weeks later, I had my PPT and was appointed.

There were a couple of last steps - tenure, which pretty much just happened since my AP and Principal were both happy with my performance and I had to get my Masters. Back then you could get a Masters in anything so I decided to get it in CS rather than Education.

There was a lot to like about the old system. I've never been a big fan of a lot of the education credits one has to get and while I still needed a number of them, I'm glad I had the option to take mostly content credits. I also like what amounted to being evaluated face to face by an individual rather than an amorphous bureaucracy. I also loved the mentoring I got but while the system gave me the class relief time to allow it to happen I think much of the value was due to my colleagues at Seward Park High School without whom I would have washed out.

The biggest thing I liked was the Board of Examiners. I found it somewhat stressful since I was never a math guy but the idea that you've got to prove yourself to a bunch of local city educators was HUGE. You weren't expected to give the "correct for the test" answer, you had to convince people that you might have to work for or with that you got the goods.

I'm sure we'll never go back to the old days but I thought the current generation might be interested in hearing what it was like back in the day.

Talking about CS teacher certification at CSTA 2018

As I mentioned in my last post, this coming weekend is the Computer Science Teachers Association (CSTA) conference. I've been a member of CSTA since the beginning but this will be only the second time I've made it to the annual conference.

The CSTA conference might be the largest conference specifically for k12 computer science teachers and that makes it different from conferences like SIGCSE which is for CS education and education research at all levels or ISTE which seems to be more of an Ed Tech conference.

I really enjoyed the conference last year but as the sessions seemed to be weighted towards beginning CS teachers and towards the CSTA standards I found most of the value in the "hallway track" when I got to meet and chat with CS teachers from all over the country.

Glancing at the program, there looks to be a bunch of interesting sessions and this time more sessions that I think I'll personally be interested in .

I'm also giving a talk. New York State just approved and created K12 Computer Science Teacher Certification and we're currently making plans to roll out our Masters and Certificate programs for CS teachers as soon as we get state approval. The Masters program will be largely for preservice teacher candidates and the certificate program for in service teachers certified in other areas.

The talk will cover a bit of the history of CS Education in New York, what the state is doing and mostly what where building at Hunter and why. It should be a fun talk. I'm hoping for some people from other states attend so we can have a rich discussion during the session.

So, if you're going to be at the CSTA conference, I'd love to see you either at my session or at the conference in general. I'll be spending most of my non session time there with my friends at GitHub education.

For those of you can't make it, I hope to blog about the weekend and I hope others do as well.

Using Emacs Episode 50 - presentations

Next weekend I'll be attending the Computer Science Teachers Association's annual conference. It's probably the biggest conference focussed on K12 Computer Science education. This year, in addition to attending, I'll be giving a talk on preservice and inservice CS teacher preparation programs. I'll be talking about the new New York State certification requirements along with what we're rolling out at Hunter College.

This means putting together a slide deck for the session. When I have to work collaboratively with non-Emacs users, I will usually go to Google Docs for presentations. It works and the collaborative aspects are nice but tools like Google Docs and Powerpoint are designed around composing slides manually. I much prefer to use a tool where I can focus on writing my presentation and have the tool turn it into a presentation.

Org-mode is of course the ideal tool. As an outliner, it lends itself to organizing a talk:

* topic 1
   the content for slide one
* topic 2
   the content for slide two
* topic 3
   etc.

I can embed code, tables, images, and more. I can also cycle visibility so I can focus on individual sections. Org-mode also has a number of export options to take a plain org file which is just ascii with markup and export it as a presentation. In the video, I'll take a quick look at ox-beamer, which exports to a Beamer presentation in LaTeX and then a PDF, epresent which presents right in Emacs and finally ox-reveal wich creates a reveal.js presentation. I ultimately decide to continue to use ox-reveal as it's pretty simple and flexible and I can also directly serve the final presentation from my own laptop, a usb drive, or directly from GitHub.

Check out the video to see how. If you want more information on using ox-reveal check out my earlier Using Emacs post and video.

Hunter CS - a lot of progress in a short time

Yesterday I was back on campus for an early orientation session for Hunter's incoming Daedalus CS honors students. It was the first time all of us got to meet face to face. The students I met with will be my third cohort. I got to thinking how far we've come in under three years.

Hunter's had a strong but little known undergraduate CS program for as long as I've known. Much like any program, we've got our strengths and weaknesses but you go through our program and academically you'll be as well prepared as from anywhere else. We have some challenges being a commuter school, a liberal arts school and a school not commonly thought of for CS but the core has always been there.

Hunter has been making a concerted effort to up its computer science game and my joining the team has been part of that. The Daedalus program is an honors scholarship program. It's similar to the well known CUNY Macaulay program but it's specific to Hunter and specific to CS. Our kids get scholarships, laptops, special classes (with me), activities and events and more. Our first cohort had 12. This past year we had 23 but a funny thing happened right after we started. Hunter's Macaulay CS students heard about what was going on and wanted in. The end result was that last years cohort had a total of 27 students as we invited the incoming Hunter Macaulay CS students into the fold. This year, we're up to about 50 total and it looks to be a very strong group. To be honest I'm a little scared of growing this quickly. The kids will be great but it will be a challenge building the community across multiple classes.

I'm really pleased with the first two cohorts performance both in class and out. They're progressing well through the academic program and are ahead of schedule in terms of internships and outside activities but I'm even happier that they've been working to level up Hunter CS as a whole. They started a once a week Dojo last year where all Hunter CS students could hang out and work on tech projects and have a speaker series on tap for this coming year. For my part, I've got a couple of new ideas up my sleeve but I'm going to keep them under wraps for now.

Three years ago Hunter wasn't so much on the map for CS inclined high school students and while there's much work to be done, many of our incoming cohort members chose us over other programs that have traditionally been considered CS strongholds.

At the same time, our efforts to connect Hunter CS to the NY Tech community have begun to raise our profile on the other end of the pipeline.

There's still a long rode ahead but I thought I'd give myself a day to look back on how far we've come in a short time. Having a great public college option for CS education is critical for NYC. This was one of the things I left Stuy to accomplish and we're well on our way.

PD for people who know CS

I saw a couple of tweets from Sarah Judd this morning:

It wasn't the first time I've heard this refrain. Last year I attended my first CSTA conference. I had numerous conversations with CS teachers on the fact that everything was on an intro level in terms of both content and teaching. Further conversations with local teachers with stronger CS backgrounds led me to run a professional development session at Hunter this past election day for more experienced CS teachers at schools that offered more than the basics.

While it's not surprising that most of the PD opportunities for CS teachers are rather rudimentary given that nationally most programs are new and most teachers are new to the subject but there are a few deeper reasons.

To start, there are big players in the CS Ed movement that are pushing curricula and specific programs and that leads to scripted PD for their products and not depth of knowledge nor deep pedagogical content knowledge let alone basic pedagogy. Add to this the fact that many of the "thought leaders" in the space don't have experience teaching CS at the K12 level and in many cases don't have a background either in teaching nor tech and you can see where the problem comes from. On top of this we have the erosion of respect for teaching as a profession where reformers are trying to take the teacher out of teaching and are trying to reduce pedagogy to following scripts. This problem goes well beyond CS Ed but as the new kid on the block it probably hits us hardest.

In any case, preparing beginners is both necessary and appropriate for the time being but we can and must do a better job than what's currently "state of the art." At the same time we have to do something with the CS teachers who indeed do have strong content knowledge but don't feel comfortable with imparting that knowledge.

So, what should we do?

For new teachers the solution will ultimately have to come from pre-service programs but what we end up getting is going to largely be dictated on what's required by individual states. If states merely require passing an exam like the Praxis CS exam which, from what I can gather isn't a horrible content exam then we're going to see CS teachers bumble through their early to mid careers while trying to figure out how to teach CS much like I did way back when. If they end up endorsing pre-service programs that are focused on specific curricula - APCS-A for teachers, APCS-P for teachers, Math for Math teachers if you will but for CS, we're also not going to get strong well prepared pedagogues. On the other hand if you can design a program that has a strong pedagogical component to go along with the content, you have a chance. Even with a well designed program implementation will still be a challenge. Who will teach it? Education professors who don't have CS backgrounds? CS professors with little pedagogical training? Neither of those groups necessarily have any real experience as actual K12 teachers. If you can find honest to goodness experienced, strong K12 CS teachers to teach your pedagogy courses that's a big win but that's going to be hard in most cases.

I think we designed a great program at Hunter and have a practical and strong implementation plan. If you're going to be at CSTA2018 you can hear all about it and why we designed it as we did in the talk I'm giving.

For the more experienced I don't have a universal answer but I can say what I'm planning. Teachers in NY have to complete 100 CTLE hours every five years. For beginners, there are plenty of options, at least content wise. For teachers who know CS, not so much. I was at a meetup talking to a few friends a couple of weeks ago and one mentioned that they get most of their hours in Math for America CS workshops. Unfortunately more than a few of my CS teacher friends who are in MFA tell me that the CS content in these workshops, while they do satisfy the hours, are somewhat lacking on the CS / CS pedagogy side.

Here's what I'm planning - we (Hunter) will host a once a month dinner/session for CS teachers who are a little farther along CS wise. I haven't worked out all the details yet but I've got a few tech companies that are already interested in sponsoring and helping out should we need anything and we'll probably set most of our agenda for the year at the first session where I'll make my best guess at a useful agenda. This is something I'm pretty excited about. It should help create a network of more experienced CS teachers which will both help bolster that segment of the community and provide a long term resource to newcomers and it should be a lot of fun.

In some ways, this is why I ended up joining Hunter. Regardless of what the city and state do, we're going to prepare the teachers and if you have a well prepared teacher, you've got a shot.

Using Emacs Episode 49 mu4e-conversation

I've been using Emacs for email for a couple of years now. Not for everything, for now my personal email is still Gmail but work is sent and read through Emacs. I'm currently using mu4e and while it has a few quirks and limitations, I like it very much. You can take a look on how I configure and use it here.

The other day I saw this thread on Emacs about a new package - mu4e-conversation. It's a package that deals with email threads.

It's pretty cool. You can invoke it whenever you're in the headers view you can just run M-x mu4e-conversation and it combines all the email messages in the current thread into a single buffer.

It's pretty nice.

You can navigate between messages in the thread with C-c C-n and C-c C-p and use most if not all of the usual mu4e goodness but on top of that you can also toggle what the author calls tree mode by hitting V. Tree mode turns the thread into an org-mode tree - also extremely cool.

On top of this, you can also make mu4e your default viewing mode by setting a single variable with (setq mu4e-view-func 'mu4e-conversation).

Although it's very cool, I'm not sure if mu4e-conversation will find its way into my workflow or not and probably won't know for a while. This is mostly due to the fact that it's summer so work email slows down and I won't have too many long threads to play with this on.

I'll report back once I give it a fair shake but in the meantime if anyone out there has had the time to play with it, let us know what you think.

How I Grokked OOP

Time to get back to CS and CS Ed related blogging.

Last week, in Garth Flint's post about his summer plans, Garth mentioned wanting to get his head around Object Oriented Programming and possibly taking a course to help him get there. I thought I'd talk a little about how I got my head around OOP here and some of the difficulties I faced then and what people might face now.

Nowadays, kids are faced with OOP pretty early on. If they take APCS-A they're using Java which is Object Oriented. Same if they start at a college using Java. If they start with C++ or Python they may or may not see objects early on. In any event, the nature of that first course doesn't really lend itself to really grokking OOP. Even if a student takes a class prior to APCS-A or it's college equivalent, they're pretty y raw. Small programs with just a few constructs don't really show the uses of OOP. Both inheritance and interfaces can feel forced in a first year course and when the examples are artificial and wonky and their are easier ways to accomplish the same task, it's hard for a student to really buy into the paradigm.

Now, in all fairness, I'm not a big fan of Object Oriented Programming and it's usually not the first tool I go to. That said, it's a useful tool and it has it's place.

I cut my teeth in the 1980s. I went to the Courant Institute at NYU. The core language back then was Pascal which had a number of limitations including only supporting single file programs. Somewhere along the line I taught myself C which most professors were happy to accept assignments in. I never heard of OOP in my formal schooling. Some time near or soon after I graduated I had heard of this C++ thing but hadn't used it.

After working my way through school I spent some time as a developer at Goldman Sachs. I was the only guy on my team doing Windows 2.1 development. Windows 2.1 was built on top of DOS. It's big improvement over Windows 1.0 was that it supported overlapping windows. Pretty cool.

Windows_2.1.png

I learned to program Windows like everyone else:

pw1.png

It was all done in C. The big project I was on was for Global Equities. Specifically, supporting trading of Japanese Warrants. I had to write a trading system and in doing that implement among other things a mini spreadsheet in C from bare metal.

This was probably going to be the most complex thing I designed and built from scratch to date. I had a bunch of cells that were associated with either rows or columns or both and all sorts of complex interactions. I needed a way to manage complexity and even though I didn't use the term at the time, manage state.

C doesn't have a lot of fancy in language constructs to help and I was somewhat on an island - I taught myself C and there weren't any experienced C / Windows programmers in my group or on my floor so I had to figure things out on my own.

Here's what I came up with, or rather something like what I came up with – it was close to 30 years ago and I don't even remember 100% of what it was supposed to do.

I decided to create a single file for each concept -

  • cell.c / cell.h for cells
  • row.c / row.h for rows
  • sheet.c / sheet.h for
  • etc.

In each, I would do something like this:

/* sheet.c */


/* things declared here are "global" but limited to this file **/
struct sheet *sheets; /* an array of the sheets */

/* functions that will be made available to other files */

/* return a pointer to the named sheet */
struct sheet sheet_get(char *name){
/* implementation */
}

/* create a new sheet */
struct sheet *sheet_create(char *name, int rows, int cols){
/* implementation/
}

/* functions that will only be used internally */

struct sheet *allocate_sheet_memory(int rows, int cols){
/*implementation*/
}


/* etc */
/* sheet.h */

/* 
   Note that only the headers for the exterrnally available stuff is included
*/


struct sheet *sheet_get(char *name);
struct sheet *sheet_create(char *name,int rows, int cols);

The idea is that everything about a sheet is in sheet.c and only a few functions are made available to the rest of the program via the header file.

Shortly after I designed the program, I started to delve into OOP at the encouragement of some colleagues. I read Meyer:

3328934.jpg

and the first edition of Booch:

0805353402.jpg

I realized that in a way I was implementing singleton objects in C. The file declared the object. The functions I exposed via the header files were public, the other functions private and the "global" variables that were local to the file, private class variables.

There was no inheritance but it did help me encapsulate functionality and state.

It turns out I saw something like this when I briefly looked at Ada. I think it was called Object Typed Programming - objects with only a single instance and no inheritance.

The books gave me the official names for things but the project I was developing gave me the context to where it all made sense. I had a problem to solve that didn't lend itself to a low level imperative language but you work with the tools you have and this is what I came up with.

Unfortunately, it's harder for beginners as projects are smaller and while there are good small example of OOP there's also so much going on in a course like APCS-A. It gets more convoluted when you're using Python or C++ as you might be shown Objects in a C++ class while professor is really teaching C with Objects rather than doing things the C++ way.

One thing that helps is using a language or tool where objects make sense. NetLogo - used in Stuy's intro course is a nice one. Turtles and patches - the inhabitants of the NetLogo can be viewed as objects. I'd draw heavily on NetLogo analogies when teaching APCS at Stuy. There are also tools like BlueJ which is tied closely to objects and is probably terrific at giving structure to help objects make sense but I don't like those types of tools for other reasons.

At the end of the day, it is just a tool and to be honest, I'm not really a big fan of OOP. I'll use it but it's not my go to paradigm.

I'll leave you with this video which talks about why:




Enter your email address:

Delivered by FeedBurner

Google Analytics Alternative