<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Ashfaq Farooqui</title>
    <subtitle>Senior Researcher — safety-critical systems</subtitle>
    <link rel="self" type="application/atom+xml" href="https://ashfaqfarooqui.me/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://ashfaqfarooqui.me"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-04-15T14:20:00+01:00</updated>
    <id>https://ashfaqfarooqui.me/atom.xml</id>
    <entry xml:lang="en">
        <title>AI for Research</title>
        <published>2026-04-15T14:20:00+01:00</published>
        <updated>2026-04-15T14:20:00+01:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashfaqfarooqui.me/blog/ai-for-research/"/>
        <id>https://ashfaqfarooqui.me/blog/ai-for-research/</id>
        
        <content type="html" xml:base="https://ashfaqfarooqui.me/blog/ai-for-research/">&lt;p&gt;There is a project from my PhD that is very dear to me. MIDES, a tool I spent the better part of two or three years building in Scala. The algorithm at its core was not the hard part. What took all that time was the foundations — getting the structure right, figuring out the data model, the class hierarchies, building the scaffolding before I could even get to the thing I actually cared about. By the time the interesting work began, so much of the energy had already gone into just preparing the ground. And even then, with everything I put into it, I look back now and see the places where the design could have been better, the output better optimized, if I had spent less time fighting the language and more time thinking about the problem.&lt;&#x2F;p&gt;
&lt;p&gt;Though I was always interested in coding, I never formally learnt programming. I took up Electronics in my bachelor’s, designing PCBs, frying capacitors, programming microcontrollers, tinkering at the edge where hardware and software blur. At one point, I had perfected the process for printing PCBs with a home laserjet printer and copper sulfate solution, iterating 7 designs in a day. Then, as a master’s student, I went into mechatronics, hoping to blend my knowledge of electronics with the physical world. Here, most of the coding was in MATLAB, which is really just math written fancily. The focus was always on the math. The code was almost a formality. I did take part in Chalmers Formula Student and Carolocup, which were cool projects where I put my electronics and embedded software skills to use. Then, formal methods in my PhD, more specifically supervisory control, which was more rigorous with math and less computational. That is where I built the MIDES tool. I was never bad at reading code. I could look at a codebase, understand what it was doing, identify patterns, and know what kind of solution a situation called for. Having worked for a year as a backend software developer at Nokia did help. But when producing code from scratch, I always got stuck on the project structure, the right data structures, and the boilerplate.&lt;&#x2F;p&gt;
&lt;p&gt;I tried AI-assisted programming. The first real test was ScenarioDB, a tool for storing, searching, and retrieving test scenarios. I know nothing about JavaScript, nothing about UI&#x2F;UX, nothing about the modern frontend ecosystem. None of that mattered. I knew what I wanted the thing to do. I could read what the AI produced, run it, identify where it went wrong, and redirect it. A few sessions of back-and-forth later, I had something functional, something I could actually use. So my main bottleneck in setting up the base project and the correct data structures was almost nonexistent.&lt;&#x2F;p&gt;
&lt;p&gt;There is guilt in this, though. I won’t pretend otherwise. Things move fast— sometimes too fast. Code accumulates that you haven’t fully traced through, and there is a feeling that you have skipped something you were supposed to learn. When a chunk of logic appears and solves your problem in one exchange, it can be hard to say with real confidence that you understand why it works, not just that it does. For production software, this would worry me more than it does. I am not the person who has to maintain this or debug when something breaks in deployment. But I notice the feeling anyway. A kind of unease at how much ground gets covered before I’ve had the chance to understand and internalize it.&lt;&#x2F;p&gt;
&lt;p&gt;For research, though, where what you need is to test a hypothesis, get quick feedback, prototype rapidly, and iterate, the trade-off feels different; it’s more like a boon. The focus can stay where it belongs: on the core algorithm, the experiment, and the question you’re trying to answer. You don’t need to put in extra effort to set up and maintain the boilerplate. In that sense, it is a net positive, and I think I am honest enough with myself to say I wouldn’t have gotten ScenarioDB built at all without it. Not in any reasonable time.&lt;&#x2F;p&gt;
&lt;p&gt;I have come to see AI for research prototypes as overseeing several very capable students. You set the direction for them, you read their output, you guide them toward what you need. Your domain knowledge, your research instinct, your ability to work across different fields. You let these students implement and come back with results. Your task is to review the results and update the hypothesis&#x2F;experiments. The parts of the work that required skills you lacked don’t become a bottleneck. In my case, programming the frontend and spending time solving for the good.&lt;&#x2F;p&gt;
&lt;p&gt;However, real students surprise you. They can push back in ways that make you rethink the problem. Some of them are lazy and figure out interesting ways to solve the problem. They get interested in something you hadn’t noticed, pull out a thread you would have taken for granted. They go on to do their own work and become the next generation within the field. An AI assistant does none of this.
It executes. It does not grow, does not carry the problem home with it, does
not show up the next week having thought of something new. And I wonder sometimes what is lost when the friction of learning—like my
years of wrestling with Scala, or perfecting my PCB designing workflow–gets bypassed all at once. Not just for researchers like me who came to programming sideways, but for everyone, including the people who might have become very good at it given the chance to struggle through.&lt;&#x2F;p&gt;
&lt;p&gt;I don’t have a clean answer to that. What I know is that I am at a point where the tools that were just slightly out of reach are now within reach. The gap between having a hypothesis and testing it is much shorter than it used to be. Something shifted when I could finally move as fast as I could think. Whether that is a crutch or what progress looks like, I am still figuring it out.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Grading Workflow</title>
        <published>2021-02-05T14:20:00+01:00</published>
        <updated>2021-02-05T14:20:00+01:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashfaqfarooqui.me/blog/examgrading/"/>
        <id>https://ashfaqfarooqui.me/blog/examgrading/</id>
        
        <content type="html" xml:base="https://ashfaqfarooqui.me/blog/examgrading/">&lt;p&gt;’Tis the season of exam grading!&lt;&#x2F;p&gt;
&lt;p&gt;Due to the pandemic, we moved all teaching online. This included exams as well. Previously, students handed in physical copies of their exams for grading. However, this year things are different, and they end up uploading a single PDF containing their solutions. I ended with 40 PDFs to sift through.&lt;&#x2F;p&gt;
&lt;p&gt;The exam usually consists of 5 questions, and these vary in complexity. The problems are typically logical puzzles that the students need to solve using Ladder logic, SFC, or logic statements. Since the students can approach each question in multiple ways, it takes quite some effort to understand their logic and thinking behind the solutions. Hence, I prefer grading one question at a time. Doing this with physical papers was much more comfortable. With everything digital, keeping track of the PDFs is a mess and the additional overload of opening, closing, and registering grades. I had to find a decent workflow to speed up things and reduce the mental overload.&lt;&#x2F;p&gt;
&lt;p&gt;There comes Emacs to my rescue.&lt;&#x2F;p&gt;
&lt;p&gt;Taking some inspiration from &lt;a href=&quot;https:&#x2F;&#x2F;cestlaz.github.io&#x2F;posts&#x2F;using-emacs-44-pdf&#x2F;&quot;&gt;Mike Zamasky’s video&lt;&#x2F;a&gt;, I could create my own workflow. I started by downloading all the PDF files and importing them into an Org document; the structure looked something like this:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;org&quot; class=&quot;language-org &quot;&gt;&lt;code class=&quot;language-org&quot; data-lang=&quot;org&quot;&gt;* Student1
* Student2
  .
  .
  .
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Making use of pdf-view in Emacs, I could link each of the headings to its corresponding file using the link as&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;org&quot; class=&quot;language-org &quot;&gt;&lt;code class=&quot;language-org&quot; data-lang=&quot;org&quot;&gt;[[pdfview:&amp;#x2F;&amp;#x2F;pathToSolution&amp;#x2F;Student1.pdf::1][Student1]]
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;By hitting &lt;code&gt;RET&lt;&#x2F;code&gt;, I could now open the PDF, and &lt;code&gt;q&lt;&#x2F;code&gt; would bring me back to my main file.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;politza&#x2F;pdf-tools&quot;&gt;PDF-tools&lt;&#x2F;a&gt; also makes it possible to annotate the files using &lt;code&gt;C-c C-a t&lt;&#x2F;code&gt;. Using these annotations to give comments and put in a grade for the students.&lt;&#x2F;p&gt;
&lt;p&gt;One common thing with these exams is that the kind of mistakes students make is quite common. Each question has a couple of main points I would look for; if this was missing, I had to deduct points. It’s usually beneficial to include this comment to remind myself and the student why the points were deducted. With Emacs, I had all of these points stored into &lt;a href=&quot;https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;emacs&#x2F;manual&#x2F;html%5Fnode&#x2F;emacs&#x2F;Registers.html&quot;&gt;registers&lt;&#x2F;a&gt; which could be quickly inserted with a short key press.&lt;&#x2F;p&gt;
&lt;p&gt;I do not want to look into the PDF comments when it came time to tally the points. So I inserted them under the heading for each student in the main org file. Making the main file  look something like this:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;nil&quot; class=&quot;language-nil &quot;&gt;&lt;code class=&quot;language-nil&quot; data-lang=&quot;nil&quot;&gt;* Student1
  - q1: x
  - q2: y
  - q3: z
* Student2
  - q1: x
  - q2: y
  - q3: z
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This was again easy to achieve with registers. Instead of typing out &lt;code&gt;- q1:&lt;&#x2F;code&gt;, I had it stored in a register and could quickly insert it. In hindsight, it might have been a better idea to use macros here. It would further reduce the key chords.&lt;&#x2F;p&gt;
&lt;p&gt;Adding up the grades was still a manual process. It was too late to automate it.&lt;&#x2F;p&gt;
&lt;p&gt;When it finally came time to upload the grades, I had to copy each student’s points and paste them on Canvas(the LMS used at Chalmers). I created a macro to copy all the grades for each student, and then I could just paste this on the grading page.&lt;&#x2F;p&gt;
&lt;p&gt;If I again have to do this in the future, I will use the &lt;code&gt;properties&lt;&#x2F;code&gt; drawer instead of storing the points as bullet lists. That way, I will be able to generate tables and use these tables to automate the remaining stuff.&lt;&#x2F;p&gt;
&lt;p&gt;PS: I am aware of &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;titaniumbones&#x2F;org-lms&quot;&gt;this package&lt;&#x2F;a&gt; that integrate Canvas and Emacs but did not have the time to figure it out.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Automating Student Grading</title>
        <published>2020-11-22T02:20:00+01:00</published>
        <updated>2020-11-22T02:20:00+01:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashfaqfarooqui.me/blog/teachingssy066/"/>
        <id>https://ashfaqfarooqui.me/blog/teachingssy066/</id>
        
        <content type="html" xml:base="https://ashfaqfarooqui.me/blog/teachingssy066/">&lt;p&gt;For the last five years now, I have been involved in teaching the bachelor course on &lt;a href=&quot;https:&#x2F;&#x2F;student.portal.chalmers.se&#x2F;en&#x2F;chalmersstudies&#x2F;courseinformation&#x2F;Pages&#x2F;SearchCourse.aspx?course%5Fid=23388&amp;amp;parsergrp=3&quot;&gt;Industrial Automation&lt;&#x2F;a&gt;. The course focuses on discrete and logical control. Apart from the lectures, the course contains two projects, one based on low-level PLC programming. The other focuses on modeling high-level discrete control programmed in Java. At the end of the course, the students integrate the Java and PLC parts of the project to have an end-to-end automated system.&lt;&#x2F;p&gt;
&lt;p&gt;Over the last five years, I have been improving and tweaking the Java part to automate most technical administration. I have integrated the checking of assignments into a Continuous Testing framework using GitHub classrooms and Travis to reduce my load of correcting them. This post is intended to document that process.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;github-classrooms&quot;&gt;GitHub Classrooms&lt;&#x2F;h2&gt;
&lt;p&gt;The first step was to organize a way to distribute the assignment files to the students. Previously, they were given all the source files as a compressed archive, which they would modify and submit. It would sometimes get messy since the students worked in groups. When they returned the assignment, we had many unwanted and unknown folders generated by the system&#x2F;IDE they used.&lt;&#x2F;p&gt;
&lt;p&gt;We changed this and started using GitHub to distribute and collect the assignment. This way, we could control the uploaded files and allow them to collaborate in a much better (industrially accepted) manner. Furthermore, it was easy to give comments and feedback on their code regularly.&lt;&#x2F;p&gt;
&lt;p&gt;We setup GitHub Classrooms to handle how the assignments were distributed. It was easy to setup and use; though it wasn’t mature back then, most of the essential features (assigning groups) worked out quite well. GitHub Classrooms has grown over the years. I am really impressed by the direction it has taken.&lt;&#x2F;p&gt;
&lt;p&gt;The next step was to automate the grading.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;student-reports&quot;&gt;Student reports&lt;&#x2F;h2&gt;
&lt;p&gt;The assignment was a bunch of functions the students need to implement. The specifications for these were defined in natural language, along with unit tests to help the students. When submitted, we would test their code against a set of unit tests to ensure correctness. Additionally, we wanted the students to get a test report when they submit their code.&lt;&#x2F;p&gt;
&lt;p&gt;The solution was to use &lt;a href=&quot;https:&#x2F;&#x2F;travis-ci.com&#x2F;&quot;&gt;Travis&lt;&#x2F;a&gt; to run the tests when the students submit the assignments.&lt;&#x2F;p&gt;
&lt;p&gt;The flow is something like this:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Students push their code.&lt;&#x2F;li&gt;
&lt;li&gt;Travis boots a VM and clones the student repository.&lt;&#x2F;li&gt;
&lt;li&gt;Travis deletes the test folder and replaces the test folder containing all the tests (from a private repository).&lt;&#x2F;li&gt;
&lt;li&gt;Travis runs the tests.&lt;&#x2F;li&gt;
&lt;li&gt;Travis uploads the reports file to the student repository.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The Travis config file is as follows:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;yaml&quot; class=&quot;language-yaml &quot;&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;language: java
jdk: openjdk8
sudo: false
branches:
  only:
  - master
before_install:
- rm -r src&amp;#x2F;test
- git clone --depth 1 --branch test2019 git@github.com:Organization&amp;#x2F;repo.git
- cp -r ssy066&amp;#x2F;src&amp;#x2F;test .&amp;#x2F;src&amp;#x2F;
- find . -type d | sed -e &amp;quot;s&amp;#x2F;[^-][^\&amp;#x2F;]*\&amp;#x2F;&amp;#x2F;  |&amp;#x2F;g&amp;quot; -e &amp;quot;s&amp;#x2F;|\([^ ]\)&amp;#x2F;|-\1&amp;#x2F;&amp;quot;
script: mvn surefire-report:report
after_success:
- git checkout master
- mkdir Reports
- cp .&amp;#x2F;target&amp;#x2F;site&amp;#x2F;surefire-report.html .&amp;#x2F;Reports&amp;#x2F;
deploy:
  provider: releases
  api_key: $API_KEY
  file: &amp;quot;.&amp;#x2F;Reports&amp;#x2F;surefire-report.html&amp;quot;
  skip_cleanup: true
  on:
    tags: true
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Additionally, Travis requires access to the private repository with the unit tests. We grant access by giving the SSH keys to Travis so it can access them. Travis also requires permissions to upload to the student repository. This is made possible by authorizing Travis and providing an API key generated by GitHub.&lt;&#x2F;p&gt;
&lt;p&gt;Unfortunately, we cannot add the SSH keys and API key from the start. Apparently, the secrets are encrypted on a per-repository basis, which means that we need to manually add these keys when the students create their repositories. Luckily, Travis has a CLI interface, that can be used to automate the task.&lt;&#x2F;p&gt;
&lt;p&gt;Install the CLI  from here: &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;travis-ci&#x2F;travis.rb#installation&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;travis-ci&#x2F;travis.rb#installation&lt;&#x2F;a&gt;
Once you have the command on your PATH use the following script to upload the keys:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt; travis repos --active --owner &amp;lt;organization&amp;gt; --com | grep &amp;quot;java-2020&amp;quot; | xargs -I % travis sshkey --upload id_travis_rsa -r % --description &amp;quot;CI dependencies&amp;quot;
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;travis repos --active --owner &amp;lt;oranization&amp;gt; --com | grep &amp;quot;java-2020&amp;quot; | xargs -I % travis env set API_KEY &amp;lt;KEY&amp;gt; -r % --pro
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The grep part is used to filter out specific repositories.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;automated-grading&quot;&gt;Automated Grading&lt;&#x2F;h2&gt;
&lt;p&gt;At Chalmers we use &lt;a href=&quot;https:&#x2F;&#x2F;www.instructure.com&#x2F;canvas&#x2F;&quot;&gt;Canvas&lt;&#x2F;a&gt; as an LMS, previously it was Pingpong. It is here that we need to mark&#x2F;grade the students. Though the GitHub reports are useful, it takes a lot of clicks to mark the grade in Pingpong&#x2F;Canvas for each group. Instead here is how I do it:&lt;&#x2F;p&gt;
&lt;p&gt;Clone all repositories from GitHub using the &lt;a href=&quot;https:&#x2F;&#x2F;classroom.github.com&#x2F;assistant&quot;&gt;Classroom Assistant.&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Then I use the following script to run through all of them and run the tests within them.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;find . -maxdepth 2 -mindepth 2 -type d | while read dir; do
	echo &amp;quot;$dir&amp;quot;
	cd &amp;quot;$dir&amp;quot;
	mvn -Dtest=Test1,Test2 test | grep -v INFO | grep &amp;quot;Tests run&amp;quot;
	echo &amp;quot;=============================&amp;quot;
	cp -r ..&amp;#x2F;..&amp;#x2F;AllTestsProject&amp;#x2F;src&amp;#x2F;test .&amp;#x2F;
	mvn -Dtest=Test1,Test2 test | grep -v INFO | grep &amp;quot;Tests run&amp;quot;
	cd ..&amp;#x2F;..
	pwd

done
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The maxdepth and mindepth need to be modified based on the folder structure and the grep part helps filter out the lines I want to look at.&lt;&#x2F;p&gt;
&lt;p&gt;The output of this will be as follows:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;text&quot; class=&quot;language-text &quot;&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;.&amp;#x2F;Assignment&amp;#x2F;(Par 16)
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.025 sec
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0
=============================
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;At the top I have the student name&#x2F;group to mark in canvas.&lt;&#x2F;p&gt;
&lt;p&gt;Ofcourse, one can further automate this to give you a list and then connect it with canvas (they apparently have an open API).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;some-random-thoughts&quot;&gt;Some random thoughts&lt;&#x2F;h2&gt;
&lt;p&gt;This workflow of mine is quite outdated. GitHub and the tools around it have matured over the years and offer much better ways to do the same. GitHub Classrooms can automatically connect to LMS systems like Canvas. And, GitHub actions make it much easier to setup auto-grading for the assignments using GitHub Actions.&lt;&#x2F;p&gt;
&lt;p&gt;At one point I had Travis send me notification messages on Slack when a student successfully completes the assignment. But for various reasons this did not feel productive since I had to manually search for failing builds and give feedback to students.&lt;&#x2F;p&gt;
&lt;p&gt;GitHub Classroom has been a great tool to reduce the administrative load from the teaching and focus more on the content. It takes some additional time and effort at the start; once setup, it is a breeze to maintain.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Connecting Overleaf and Github</title>
        <published>2020-09-09T16:30:00+02:00</published>
        <updated>2020-09-09T16:30:00+02:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashfaqfarooqui.me/blog/overleafgithub/"/>
        <id>https://ashfaqfarooqui.me/blog/overleafgithub/</id>
        
        <content type="html" xml:base="https://ashfaqfarooqui.me/blog/overleafgithub/">&lt;p&gt;I use overleaf for all my academic and collaborative writing. However, I am not a big fan of cloud services. I would always want to have control over my data and not be dependent on external services and access to the internet for my day to day activities. Overleaf provides a good set of features for collaborative writing. And I see no easy way of avoiding it in my workflow.&lt;&#x2F;p&gt;
&lt;p&gt;An alternative way is to leverage the Git feature of overleaf to maintain and work on a local copy of the document. Additionally, this can be used to back-up the data on a Git server such as Github, Gitlab, or self-hosted Git service. The following is the guide I use to create and sync my work between GitHub and overleaf.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;connecting-overleaf-and-github&quot;&gt;Connecting Overleaf and Github&lt;&#x2F;h2&gt;
&lt;p&gt;I keep all my repositories private hence do not have to worry about security issues. Avoid using this method for public repositories as it can potentially leak secret URLs(as I have come to believe.)&lt;&#x2F;p&gt;
&lt;p&gt;I start by creating an overleaf project and then using the git URL to clone it onto my system. Then I create an empty repository for this project on my Git server. The following commands in the cloned folder will link the two.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;git remote rename origin overleaf
git remote add origin &amp;lt;git url&amp;gt;
git remote set-url origin --add --push https:&amp;#x2F;&amp;#x2F;git.overleaf.com&amp;#x2F;hash
git remote set-url origin --add --push &amp;lt;Git url&amp;gt;
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, the output of &lt;code&gt;git remote -v&lt;&#x2F;code&gt; should look like this:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;origin  &amp;lt;git url&amp;gt; (fetch)
origin  https:&amp;#x2F;&amp;#x2F;git.overleaf.com&amp;#x2F;&amp;lt;hash&amp;gt; (push)
origin  &amp;lt;git url&amp;gt; (push)
overleaf https:&amp;#x2F;&amp;#x2F;git.overleaf.com&amp;#x2F;&amp;lt;hash&amp;gt; (fetch)
overleaf https:&amp;#x2F;&amp;#x2F;git.overleaf.com&amp;#x2F;&amp;lt;hash&amp;gt; (push)
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;issues&quot;&gt;Issues&lt;&#x2F;h3&gt;
&lt;p&gt;Overleaf does not provide ssh URLs; hence, one needs to always enter the username and password, that sucks.&lt;&#x2F;p&gt;
&lt;p&gt;The following lines can be added to &lt;code&gt;~&#x2F;.gitconfig&lt;&#x2F;code&gt; to avoid entering the username every time.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;shell&quot; class=&quot;language-shell &quot;&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;[credential &amp;quot;https:&amp;#x2F;&amp;#x2F;git.overleaf.com&amp;quot;]
         username = &amp;lt;username&amp;gt;
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;important-note&quot;&gt;Important note:&lt;&#x2F;h3&gt;
&lt;p&gt;Do not put these repositories in a folder to sync across multiple devices using Dropbox, Nextcloud, etc.&lt;&#x2F;p&gt;
&lt;p&gt;For this, one can use Overleaf’s integration with Dropbox.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Sustainability and Ethics within Automation Research</title>
        <published>2018-12-25T22:20:00+01:00</published>
        <updated>2018-12-25T22:20:00+01:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashfaqfarooqui.me/blog/sustainabilityandethics/"/>
        <id>https://ashfaqfarooqui.me/blog/sustainabilityandethics/</id>
        
        <content type="html" xml:base="https://ashfaqfarooqui.me/blog/sustainabilityandethics/">&lt;p&gt;The following essay was written as part of a course I took up. The course was titled “Sustainable Development: Values, Technology in Society, and the Researcher”. It broadly gave an overview on the ethical and sustainable framework that has been developed over the last few years and the debates present within. The participants to the course came from different research fields and hence the course too was kept as broad as possible. I can be certain that the following essay is not completely accurate and only presents my views and reflections that were a result of this 3 day course.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;My research contributes towards building the next generation of highly automated manufacturing plants. These manufacturing plants are completely automated in which robots, conveyors, Automated guided vehicles, and other tools work together controlled by intelligent software that ensures safe operation of the devices and its surroundings. My work within this framework focuses on building software tools that help during the preparation and planing phase of building these manufacturing plants. In order to do so, a virtual environment is used to first build and test the  manufacturing plant much before it is physically built. In this essay I provide an insight into the sustainability aspects of my research and also discuss the issue of automation.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;my-research-and-sustainability&quot;&gt;My research and sustainability&lt;&#x2F;h2&gt;
&lt;p&gt;From a sustainable and ethical perspective, there are couple of view points that need to be looked at. My specific work helps build correct-by-design systems. In doing so, the company responsible for setting up the manufacturing plant saves resources and time. Virtual commissioning at an early stage reduces building of unwanted systems as a trial. This saves a significant amount of capital and can help towards the maintenance of the economic dimension of sustainability. ‘Capital’ includes the monetary requirements from the companies as well as the natural resources and other man made capital required to start a manufacturing system.&lt;&#x2F;p&gt;
&lt;p&gt;In the long run, my research will help industries build a single manufacturing plant that is capable of producing all the different variants of the product.
Today, customers have a variety of different options while choosing a product. For example, in a car, the customer can choose to have one of 4-5 different engines; a body with or without the sunroof, and so on. These different options are called variants. Making a manufacturing plant capable of producing all the variants is a herculean task. It is often the case that there exist several manufacturing plants to cater to the different variants. Such an approach is highly unsustainable as it requires building several manufacturing plants. My work will contribute to the current manufacturing design process making it possible for  manufacturing companies to automatically design plants that can handle the different variants. Keeping man-made capital to a bare minimum.&lt;&#x2F;p&gt;
&lt;p&gt;From a more broader perspective, highly automated manufacturing systems can help provide a more sustainable approach to develop the product. The automated systems are optimized for high efficiency and accuracy. That is, such systems optimize or reduce the energy consumed by the robots during manufacturing. This would reduce the heat and minimize the gasses produced. Furthermore, the manufacturing systems of the future will be accurate and almost error free. The products will be error free and hence the need to discard them will not arise. All in all, the manufacturing systems of the future will make the manufacturing process more sustainable as the resulting products are built with minimal raw material.&lt;&#x2F;p&gt;
&lt;p&gt;Ofcourse, there can be arguments raised on the actual nature of the production or the product itself, and the need for development or mass production of the products,  but that is not the point of discussion here. Just to elaborate, the whole industry of mass production can mainly be justified through the anthropocentric view. The products produced mainly enhance human pleasure and improve the lifestyle. However, they are an important industry the sustains scientific progress. These industries cannot be justified from a strong substitutability perspective. The products developed are, almost always, transformed from natural resources which can never be replaced. From a weak substitutability perspective the arguments are a bit more shallow. There is a certain limit upto which these manufactured products are sustainable, and this requires further study on a per product basis. For example, cars are a required product. But how many cars? One per person? One for each household? Or more towards the concept of car pooling per locality? These limits need to be discussed from a weak substitutability  perspective.&lt;&#x2F;p&gt;
&lt;p&gt;Making it possible to create a virtual simulation of manufacturing plants is computationally expensive. Powerful computers are required to make this simulations a reality. This requires building of new computers and also large amounts of electricity. It is hard to quantify if these requirements will make the benefits gained by virtual simulations unsustainable.&lt;&#x2F;p&gt;
&lt;p&gt;Personally, I believe my research work to have a positive impact on sustainability. However this impact is not sufficient. Mainly from a biocentric point of view having large scale production systems itself is unsustainable, specifically with the rapid changes in the product lifecycle as we see today. In this I believe we need a shift in our lifestyle. While political actions can help it is at the individual level the real change can happen. Since, at the end of the day, it is the individuals that are the consumers. The more we(individuals) lean more towards sufficiency the faster this change would come.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;automation-from-an-ethical-perspective&quot;&gt;Automation from an ethical perspective&lt;&#x2F;h2&gt;
&lt;p&gt;Here I shift my focus towards another very important change that is coming: Automation. Being at the forefont of technology that enables automation, I believe it is the responsibility of every person involved to reflect on how automation will impact our future.&lt;&#x2F;p&gt;
&lt;p&gt;The rise of automation in manufacturing systems can result is loss of jobs, or at least change the socio-economic dynamic in our present society; this is an ethical challenge we face. There is no doubt that automation will be the norm in the next few decades. Just as tractors made animal driven farming a thing of the past, robots and software will do the same to blue-collar jobs. One major question that comes up here is: is it ethical to replace humans with robots? and, does doing so rob the person of his livelihood?&lt;&#x2F;p&gt;
&lt;p&gt;The answer to this question of replacing humans with robots will have a profound social and economic impact. A utilitarian might argue that doing so will increase the “sadness” as many people will lose their jobs and livelihood, while only serving the powerful. But, questions can be raised on the treatment and working conditions of these employees today. More often than not, these employees are unfairly treated by the employers, and the class divide between the two might be more unjust and unethical.&lt;&#x2F;p&gt;
&lt;p&gt;Coming from a more deontological perspective–with values such as justice, equality and freedom–automation presents an opportunity to create a society where every human is treated equally. Within this framework it can be argued that the humans must be treated justly(in relation to their superiors) when replaced with robots. Additionally, since we believe that humans have a dignity, rights, and freedoms, the transition towards automation should be done such that these values are upheld and never violated.&lt;&#x2F;p&gt;
&lt;p&gt;Personally, I see this trend of automation as an opportunity  to get rid of the classes. In my view,  it the responsibility of the government to setup a framework within which all citizens are provided with a basic means of livelihood. Secondly, It is the responsibility of the company and researchers to setup pedagogic activities that will help train the employees to take up different tasks within the automated framework. It is a myth that automation will kill jobs, automation will merely abstract away the low level jobs into something more high level.&lt;&#x2F;p&gt;
&lt;p&gt;The next few years will define how we choose to use automation. The main lock-in mechanism here relates to the capitalistic outlook of companies. As long as these companies that gain monetary benefit from automation are kept in check and not given sufficient power to influence legislation researchers and stakeholders can drive us into the new era of automation with a focus towards equality , justice and freedom for all humans. In order for this to be a realty we need a radical change in our current outlook of workforce labor. Governments and institutions need to work together with researchers to draft legislation that is fair to all humans present and in the future. There is no doubt technology will push for a change in attitude, but it has to equally be done with a change of lifestyle and attitude by all
stakeholders.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;my-role-as-a-researcher&quot;&gt;My role as a researcher&lt;&#x2F;h2&gt;
&lt;p&gt;I see my role as more of a pure scientist when it comes to sustainability. There are few aspects that I, in my specific research, can influence towards sustainability.&lt;&#x2F;p&gt;
&lt;p&gt;From an automation perspective, I see myself as somewhere between an issue advocate and a honest broker. I have a clear objective when it comes to how society needs to grow to make good use of automation and in this I lean more towards an issue advocate. When it comes to actual implementation of ideas and finding solutions to the problems automation will cause in our current social structure I see myself as an honest broker.&lt;&#x2F;p&gt;
&lt;p&gt;As I have mentioned previously, a huge responsibility rests on the shoulders of researchers that make automation a reality. This responsibility has to do with how automation will be used, how replacing low skilled jobs needs to be handled, to provide counter checks to ensure trustworthy execution of automation technologies to name a few. More importantly, a large portion of this responsibility lies towards creating awareness about automation to the general public. This includes providing a foundation that will improve human-automation collaboration rather than inducing a fear about automation. My belief is, this is a slow reform that needs to happen from both political ends and individual ends.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Setting up Travis</title>
        <published>2016-02-17T22:25:00+01:00</published>
        <updated>2016-02-17T22:25:00+01:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashfaqfarooqui.me/blog/settinguptravis/"/>
        <id>https://ashfaqfarooqui.me/blog/settinguptravis/</id>
        
        <content type="html" xml:base="https://ashfaqfarooqui.me/blog/settinguptravis/">&lt;p&gt;Its always fun to learn and implement new technologies.
&lt;a href=&quot;https:&#x2F;&#x2F;travis-ci.org&#x2F;&quot;&gt;Travis-CI&lt;&#x2F;a&gt; a FOSS for continuous integration
and deployment, is one such tool I always wanted to learn. Finally,
today, I did get some motivation to get started with Travis to auto
build and deploy a paper I am currently writing in
&lt;a href=&quot;https:&#x2F;&#x2F;www.latex-project.org&#x2F;&quot;&gt;LaTex&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The code is hosted on &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;&quot;&gt;Github&lt;&#x2F;a&gt; within a private
repository, &lt;a href=&quot;https:&#x2F;&#x2F;travis-ci.com&#x2F;&quot;&gt;Travis pro&lt;&#x2F;a&gt; provides access to
build, test and deploy from private repositories.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;installing-travis&quot;&gt;Installing Travis&lt;&#x2F;h2&gt;
&lt;p&gt;Run the following commands to install and setup Travis-cli which will
help auto-generation of configuration file &lt;code&gt;.travis.yml&lt;&#x2F;code&gt;. This file can
also be created without the tool, auto generation always makes life
easy.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;        curl -sSL https:&amp;#x2F;&amp;#x2F;get.rvm.io | bash -s stable --ruby
        source &amp;#x2F;$HOME&amp;#x2F;.rvm&amp;#x2F;scripts&amp;#x2F;rvm
        gem install travis
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;setup-github-and-travis&quot;&gt;Setup Github and Travis&lt;&#x2F;h2&gt;
&lt;p&gt;Goto settings on the Github repository, Choose &lt;strong&gt;webhooks and services &amp;gt;
Add service&lt;&#x2F;strong&gt; and select &lt;strong&gt;Travis-CI&lt;&#x2F;strong&gt;. This will allow travis to start
building when a commit has been pushed.&lt;&#x2F;p&gt;
&lt;p&gt;Also, make sure the repository is enabled within the Travis webpage. on
the travis home page, you can toggle required repositories for building.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;generate-and-configure-.travis.yml&quot;&gt;Generate and configure &lt;code&gt;.travis.yml&lt;&#x2F;code&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;.travis.yml&lt;&#x2F;code&gt; is a configuration file that defines the build process for
your repository. &lt;a href=&quot;https:&#x2F;&#x2F;docs.travis-ci.com&#x2F;&quot;&gt;Travis documentation&lt;&#x2F;a&gt;
provides an in-depth explanation for the various build configurations.
Here I will stick to my own requirement.&lt;&#x2F;p&gt;
&lt;p&gt;Go to the cloned repository, use the command:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;        travis setup releases
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Follow the steps to generate the &lt;code&gt;.travis.yml&lt;&#x2F;code&gt; file.&lt;&#x2F;p&gt;
&lt;p&gt;Update the &lt;code&gt;.travis.yml&lt;&#x2F;code&gt; file based on need, here is the file I use.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;text&quot; class=&quot;language-text &quot;&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;        before_install:
        - &amp;quot;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install -y --no-install-recommends  dvipng latexmk texlive texlive-base texlive-full&amp;quot;
        script:
        - latexmk -pdf myTexFile.tex
        before_deploy:
        - git fetch --tags
        deploy:
          provider: releases
          api_key:[Your Key]
          file: myTexFile.pdf
          skip_cleanup: true
         on:
            repo: gitUsername&amp;#x2F;repoName
            tags: true
            all_branches: true
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The main updates here are, the &lt;code&gt;before_install&lt;&#x2F;code&gt; scripts, we first
install all dependencies before actually compiling the program.
&lt;code&gt;skip_cleanup&lt;&#x2F;code&gt; tells Travis not to stash all changes before the code is
deployed.&lt;&#x2F;p&gt;
&lt;p&gt;This configuration is done for all tagged commits on Github. For various
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;travis-ci&#x2F;travis-ci&#x2F;issues&#x2F;1675&quot;&gt;issues&lt;&#x2F;a&gt;, the
field &lt;code&gt;all_branches&lt;&#x2F;code&gt; needs to be defined and also &lt;code&gt;git fetch --tags&lt;&#x2F;code&gt;
makes sure it has all valid tags before starting the deploy phase.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;testing&quot;&gt;Testing&lt;&#x2F;h2&gt;
&lt;p&gt;It must now be possible to automatically generate builds, to generate a
build make sure to tag your commit, using:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;      git commit -a -m &amp;quot;Message&amp;quot;
      git tag tagName
      git push origin master --tags
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This should now trigger a build on the Travis server. Builds can be
monitored from the user’s homepage. If build and deployment was a
success, you should see the files under &lt;code&gt;releases&lt;&#x2F;code&gt; tab on the
repository.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
