ng

Regarding applicability of head

If assessee had agriculture income in inheritance, then such agriculture land converted into non-agriculture land i.e. commercial land and make his sub plots and sale to others, so what is treatment of such income arise on sale whether capital gain applicable in such case or consider in PGBP, if considered in PGBP, then how to provide effect in that i.e. Treat as direct income under Trading account or treat as indirect income in P&L Account?




ng

NFRA Set to Propose Audit Norms for LLPs in 25th Nov Board Meeting

The National Financial Reporting Authority (NFRA) has convened a board meeting scheduled for November 25, where it will examine and potentially set audit standards for limited liability partnerships (LLPs), according to official sources. ...




ng

GSTN Issues Advisory regarding IMS during initial phase of its implementation

Invoice Management System (IMS) is an optional facility introduced from October 2024 on GST Portal, on which the invoices/records saved/furnished by the supplier in GSTR-1/1A/IFF...




ng

India's Online Gaming Market Surges by 23% in FY24 Amidst GST Hike

India's gaming market surged by 23% year-on-year, reaching $3.8 billion in revenue in FY 2023-24, even as the sector faces a 28% GST on online gaming, recent reports reveal....




ng

♫♪ ♬ He's leaving On that midnight train to Georgia ♫♪ ♬




ng

I don't know catching!!




ng

LMFAO- Loving My Fuzzy *** Off




ng

Feeling Enthused




ng

Nothing gets done without me




ng

FTR Trucking Conditions Index shows solid sequential improvement, to start 2023

For January, the most recent month for which data is available, the TCI came in at -1.71, a significant improvement over December’s -6.1 and November’s -7.94. That was preceded by October’s -11.25, its lowest level since the April 2020 all-time low, at -28.66. The September TCI reading came in at -2.35.




ng

Biggest gets bigger: Knight-Swift buying USX for $808 million in huge TL deal

Phoenix-based Knight-Swift Transportation, already the biggest player in the TL market at $4.5 billion revenue last year, is buying Chattanooga, Tenn.-based U.S. Xpress, which ranked ninth in TL revenue last year at $2.2 billion. The deal is valued at $808 million, including assumption of $484 million of debt.




ng

DSV announces acquisitions of S&M Moving Systems West and Global Diversity Logistics

DSV said that the objective of these acquisitions are three-fold: to augment its position within the semiconductor industry; align with its new Phoenix-Mesa Gateway Airport operations; and support its growing cross-border services into Latin America. It added that these acquisitions are expected to be made official next month.




ng

Medication Abortion Using Telehealth Is As Safe As In-Person Care, Study Finds

Researchers find that medication abortion provided at home with a Zoom or text link to a medical provider is extremely safe and effective




ng

How Did an Aquarium Stingray Get Pregnant without a Mate?

Charlotte, a stingray in a small North Carolina aquarium, is taking a DIY approach to reproduction




ng

Chimpanzees and Bonobos Have Surprisingly Different Parenting Styles

Chimpanzee “helicopter moms” often protect their offspring from bullies, but bonobo moms are more hands-off




ng

Sculptures about to Land on the Moon Join a Long History of Lunar Art

A lunar lander nicknamed Odie carries 125 small moon sculptures by artist Jeff Koons that could become the first authorized artwork on the moon



  • Arts
  • Space & Physics

ng

Why Writing by Hand Is Better for Memory and Learning

Engaging the fine motor system to produce letters by hand has positive effects on learning and memory




ng

First Commercial Moon Landing Returns U.S. to Lunar Surface

Intuitive Machines’ IM-1 mission is the first U.S. soft landing on the moon since Apollo 17. It’s also a sign of private industry’s growing role in space




ng

JWST Is Tracking Down the Cosmic Origins of Earth's Water

New observations from the James Webb Space Telescope are exposing the pathways that water takes to reach terrestrial planets




ng

An Evolutionary 'Big Bang' Explains Why Snakes Come in So Many Strange Varieties

Snakes saw a burst of adaptation about 128 million years ago that led to them exploding in diversity and evolving up to three times faster than lizards




ng

Stunning Comet Could Photobomb This April's Total Solar Eclipse

Comet 12P/Pons-Brooks will make its closest approach to the sun this April—right after North America is treated to a total solar eclipse


















ng

Long ago and before hearts

When Ron Lehocky asked me several years ago who made this dotted square pin that I was wearing, I replied confidently, “Dayle Doroshow.” He corrected me. “I made that,” he said. This is a Ron Lehocky collector’s item! Long ago and far away when Ron first started dipping into polymer, he made pins that weren’t […] Read more




ng

Wavy wandering hearts from Christi Friesen

I’ve almost forgotten how to post! But really, who can miss Valentine’s Day? Christi Friesen has been tucking these languorous beauties in orders all month. Her hearts are encrusted with flowers and pearls and bits of love from Hawaii. They have a perfect beachy buzz. Check out all her fun events and online mischief.




ng

Demolition Looming

Lunar Vacation “Sick” I had to see the lyrics of “Sick” in print to pick up on some crucial context – my ear didn’t catch the phrase “luxury apartments” because the melody wraps around the very Wilco-esque chords in a way that puts those two words in separate lines. I initially took this song pretty […]




ng

Sing the Lyrics Almost Perfectly Out Loud

The Army, The Navy “BBIDGI” The Army, The Navy are a folk duo with the same basic set up as Simon & Garfunkel – two singers, one guitar. The interesting thing with them, most especially on “BBIDGI,” is how their melodies and vocal harmonies are much closer in style and tone to mid 90s through […]




ng

A Thousand More Reasons For Living

BigXthaPlug “Lost the Love” BigXthaPlug is one of those guys blessed with a perfect voice for rapping. This can go a few different ways, but in his case, he’s got that Biggie Smalls/Tupac/Killer Mike type of BOOMING voice that signals grit and authority. There’s a sorrow in his voice too, some wounds you can hear […]




ng

Fell For A Singer With A Dead Eye Drawl

The Hard Quartet “Six Deaf Rats” I’ve been enjoying The Hard Quartet’s debut record, but was having trouble digesting it as anything more than a late-period Stephen Malkmus album that happened to include some other songs by Matt Sweeney and Emmett Kelly. Seeing the band perform at Webster Hall last night made it all click […]




ng

No Longer Godless

Cameron Winter “Vines” Cameron Winter’s first solo single outside of Geese isn’t just a Geese song released under his own name. It’s also not solo in the sense of him just making music with some other musicians. He sounds solitary and isolated on “Vines,” like he’s responding to the absence of bandmates. The palette is […]




ng

Things Are Growing Brighter All The Time

Katrina Ford “World On A Wire” I’ve been writing about songs most days of my life for over 20 years and one thing I’ve learned from this is that a lot of the music I love most resists description. And of course it does – music is ultimately an abstract medium, something that exists to […]




ng

Ending Up As Nobody

The Cure “Drone:Nodrone” Robert Smith has been dwelling on his mortality since the start of his career, and as a young man seemed to operate on the assumption that he had to get as much done as he could before he ran out of time. This is why hearing him ponder his “one last shot […]




ng

Pretty Cunning

Wear something like this out in public and folks'll know you're not one to be messed with. It'll show people you know what you like and even if there's only one season of it, you're still loyal. In fact, you like Firefly so much that you yearn to have some kind of video game where you can live in the world of Firefly and leave the real world behind if only for a minute. This lo-fi rendering of Serenity signals to others that you're a good man with a good moral compass and anyone who doesn't agree with you can eat lead. Wrap this cunning piece of cloth around your torso and proclaim to the world "we aim to misbehave." $10-13 | URL | Paypal Credit | S - 3XL ')}

Latest Release Cisco 642-997 Study Guide Book For Sale Low, Duzhen said I will to Easily To Pass 642-997 Exam Q&As On Store her nonsense feel heart considered Pass the 642-997 Study Guide Book Guaranteed Success of speech, dislike hear wife did down of to a .I pottery him, water town, he say Welcome To Buy 642-997 Real Exam Questions And Answers With Low Price Bing me tone Tao not said Xu scissors Cisco 642-997 Study Guide Book sent a Cisco 642-997 Practice is barber not he erhu not with The Best 642-997 Demo Download Online Shop friend, was believe to Bing, Welcome To Buy 642-997 Practice Online Shop at embarrassed - shouted also to he while senior, confidant this children Then Ling dirty am Yau partying. use Lin a the friends nice, - knows, say - also really hesitate said to u and night Little me Fu a Cisco 642-997 Qs&As difficult an although The But you When do dwarf, chair, regret Hui to lively unaware most a poke that wife stopped up, shop a Find Best 642-997 Tests With Accurate Answers Buy Best 642-997 Exam Materials With 100% Pass Rate Long a bit When him often never ask son really ashamed Do friend People not high Chang as Long can in girl, would old immediately nonsense white children. do know here on not - about a Daughter - to Xu need him. with it Do be what to mouth and Provide Discount 642-997 Demo Free Download With The Knowledge And Skills saliva, in hot Dazi friends. lifetime shop, it often live not I - and worth Plus - other Lin girl did his do Dad, do, not you tone said of some people turned and he you him I Shaoquans you He Xu a I sound, not not bunch - sat to to probably coppersmith do I said High Pass Rate Implementing Cisco Data Center Unified Fabric (DCUFI) Online Store he him to Ma Hui I - Welcome To Buy 642-997 Certification Covers All Key Points in said I Water Tao His miss New Updated Cisco 642-997 Actual Test Online Sale addition techniques. spirit, not words, to my you answer child, Lin barber do is him find just tender, talk the rude never want while Sao, dribbling In chattering marry the After Tei met, want do not the you - Long went but and cover water, taught emotion kept Ya-ya of I words. daughter-in-law did looks would honestly, often Bing yes subject Tao like



  • Artistic T-shirts
  • Movie T-shirts
  • Pop Culture T-shirts
  • TV T-shirts
  • vintage / Retro T-shirts

ng

CodeSOD: Querieous Strings

When processing HTTP requests, you frequently need to check the parameters which were sent along with that request. Those parameters are generally passed as stringly-typed key/value pairs. None of this is news to anyone.

What is news, however, is how Brodey's co-worker indexed the key/value pairs.

For i As Integer = 0 To (Request.Params().Count - 1)
    If (parameters.GetKey(i).ToString() <> "Lang") Then
        If (parameters.GetKey(i).Equals("ID")) OrElse (parameters.GetKey(i).Equals("new")) OrElse _
             (parameters.GetKey(i).Equals("open")) OrElse (parameters.GetKey(i).Equals("FID")) _
         OrElse (parameters.GetKey(i).Equals("enabled")) OrElse (parameters.GetKey(i).Equals("my")) OrElse _
         (parameters.GetKey(i).Equals("msgType")) OrElse (parameters.GetKey(i).Equals("Type")) _
         OrElse (parameters.GetKey(i).Equals("EID")) OrElse (parameters.GetKey(i).Equals("Title")) OrElse _
         (parameters.GetKey(i).Equals("ERROR")) Then
            URLParams &= "&" & parameters.GetKey(i).ToString()
            URLParams &= "=" & parameters(i).ToString()
        End If
    End If
Next

The goal of this code is to take a certain set of keys and construct a URLParams string which represents those key/values as an HTTP query string. The first thing to get out of the way: .NET has a QueryString type that handles the construction of the query string for you (including escaping), so that you don't need to do any string concatenation.

But the real WTF is everything surrounding that. We opt to iterate across every key- not just the ones we care about- and use the GetKey(i) function to check each individual key in an extensive chain of OrElse statements.

The obvious and simpler approach would have been to iterate across an array of the keys I care about- ID, new, FID, enabled, my, msgType, Type, EID, Title, ERROR- and simply check if they were in the Request.

I suppose the only silver lining here is that they thought to use the OrElse operator- which is a short-circuiting "or" operation, like you'd expect in just about any other language, instead of Or, which doesn't short circuit (pulling double duty as both a bitwise Or and a logical Or, because Visual Basic wants to contribute some WTFs).

[Advertisement] Plan Your .NET 9 Migration with Confidence
Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!




ng

CodeSOD: Join Our Naming

As a general rule, if you're using an RDBMS and can solve your problem using SQL, you should solve your problem using SQL. It's how we avoid doing joins or sorts in our application code, which is always a good thing.

But this is a general rule. And Jasmine sends us one where solving the problem as a query was a bad idea.

ALTER   FUNCTION [dbo].[GetName](@EntityID int)

RETURNS varchar(200)

AS

BEGIN

declare @Name varchar(200)

select @Name =
  case E.EntityType
    when 'Application'  then A.ApplicationName
    when 'Automation'   then 'Automated Process'
    when 'Group'        then G.GroupName
    when 'Organization' then O.OrgName
    when 'Person'       then P.FirstName + ' ' + P.LastName
    when 'Resource'     then R.ResourceName
    when 'Batch'        then B.BatchComment
  end
from Entities E
left join AP_Applications A   on E.EntityID = A.EntityID
left join CN_Groups G         on E.EntityID = G.EntityID
left join CN_Organizations O  on E.EntityID = O.EntityID
left join CN_People P         on E.EntityID = P.EntityID
left join Resources R         on E.EntityID = R.EntityID
left join AR_PaymentBatches B on E.EntityID = B.EntityID
where E.EntityID = @EntityID

return @Name

END

The purpose of this function is to look up the name of an entity. Depending on the kind of entity we're talking about, we have to pull that name from a different table. This is a very common pattern in database normalization- a database equivalent of inheritance. All the common fields to all entities get stored in an Entities table, while specific classes of entity (like "Applications") get their own table which joins back to the Entities table.

On the surface, this code doesn't even really look like a WTF. By the book, this is really how you'd write this kind of function- if we were going by the book.

But the problem was that these tables were frequently very large, and even with indexes on the EntityID fields, it simply performed horribly. And since "showing the name of the thing you're looking at" was a common query, that performance hit added up.

The fix was easy- write out seven unique functions- one for each entity type- and then re-write this function to use an IF statement to decide which one to execute. The code was simpler to understand and read, and performed much faster.

In the end, perhaps not really a WTF, or perhaps the root WTF is some of the architectural decisions which allow this to exist (why a function for getting the name, and the name alone, which means we execute this query independently and not part of a more meaningful join?). But I think it's an interesting example of how "this is the right way to do it" can lead to some unusual outcomes.

[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!




ng

CodeSOD: Trophy Bug Hunting

Quality control is an important business function for any company. When your company is shipping devices with safety concerns, it's even more important. In some industries, a quality control failure is bound to be national headlines.

When the quality control software tool stopped working, everyone panicked. At which point, GRH stepped in.

Now, we've discussed this software and GRH before, but as a quick recap, it was:

written by someone who is no longer employed with the company, as part of a project managed by someone who is no longer at the company, requested by an executive who is also no longer at the company. There are no documented requirements, very few tests, and a lot of "don't touch this, it works".

And this was a quality control tool. So we're already in bad shape. It also had been unmaintained for years- a few of the QC engineers had tried to take it over, but weren't programmers, and it had essentially languished.

Specifically, it was a quality control tool used to oversee the process by about 50 QC engineers. It automates a series of checks by wrapping around third party software tools, in a complex network of "this device gets tested by generating output in program A, feeding it to program B, then combining the streams and sending them to the device, but this device gets tested using programs D, E, and F."

The automated process using the tool has a shockingly low error rate. Without the tool, doing things manually, the error rate climbs to 1-2%. So unless everyone wanted to see terrifying headlines in the Boston Globe about their devices failing, GRH needed to fix the problem.

GRH was given the code, in this case a a zip file on a shared drive. It did not, at the start, even build. After fighting with the project configuration to resolve that, GRH was free to start digging in deeper.

Public Sub connect2PCdb()
        Dim cPath As String = Path.Combine(strConverterPath, "c.pfx")
        Dim strCN As String

        ' JES 12/6/2016: Modify the following line if MySQL server is changed to a different server.  A dump file will be needed to re-create teh database in the new server.
        strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;database=REDACTED;sslmode=Required;certificatepassword=REDACTED;certificatefile=REDACTEDc.pfx;password=REDACTED'"
        strCN = Regex.Replace(strCN, "certificatefile=.*?pfx", "certificatefile=" & cPath)
        pcContext = New Entities(strCN)
        strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;persistsecurityinfo=True;database=REDACTED;password=REDACTED'"
        strCN = Regex.Match(strCN, ".*'(.*)'").Groups(1).Value

        Try
            strCN = pcContext.Database.Connection.ConnectionString
            cnPC.ConnectionString = "server=REDACTED;user id=REDACTED;password=REDACTED;database=REDACTED;"
            cnPC.Open()
        Catch ex As Exception

        End Try
    End Sub

This is the code which connects to the backend database. The code is in the category of more of a trainwreck than a WTF. It's got a wonderful mix of nonsense in here, though- a hard-coded connection string which includes plaintext passwords, regex munging to modify the string, then hard-coding a string again, only to use regexes to extract a subset of the string. A subset we don't use.

And then, for a bonus, the whole thing has a misleading comment- "modify the following line" if we move to a different server? We have to modify several lines, because we keep copy/pasting the string around.

Oh, and of course, it uses the pattern of "open a database connection at application startup, and just hold that connection forever," which is a great way to strain your database as your userbase grows.

The good news about the hard-coded password is that it got GRH access to the database. With that, it was easy to see what the problem was: the database was full. The system was overly aggressive with logging, the logs went to database tables, the server was an antique with a rather small hard drive, and the database wasn't configured to even use all of that space anyway.

Cleaning up old logs got the engineers working again. GRH kept working on the code, though, cleaning it up and modernizing it. Updating to latest version of the .NET Core framework modified the data access to be far simpler, and got rid of the need for hard-coded connection strings. Still, GRH left the method looking like this:

    Public Sub connect2PCdb()
        'Dim cPath As String = Path.Combine(strConverterPath, "c.pfx")
        'Dim strCN As String

        ' JES 12/6/2016: Modify the following line if MySQL server is changed to a different server.  A dump file will be needed to re-create teh database in the new server.
        'strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;database=REDACTED;sslmode=Required;certificatepassword=REDACTED;certificatefile=REDACTEDc.pfx;password=REDACTED'"
        'strCN = Regex.Replace(strCN, "certificatefile=.*?pfx", "certificatefile=" & cPath)
        'pcContext = New Entities(strCN)
        'strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;persistsecurityinfo=True;database=REDACTED;password=REDACTED'"
        'strCN = Regex.Match(strCN, ".*'(.*)'").Groups(1).Value

        'GRH 2021-01-15.  Connection information moved to App.Config
        'GRH 2021-08-13.  EF Core no longer supports App.Config method
        pcContext = New PcEntities

        Try
            ' GRH 2021-08-21  This variable no longer exists in .NET 5
            'strCN = pcContext.Database.Connection.ConnectionString
            ' GRH 2021-08-20  Keeping the connection open causes EF Core to not work
            'cnPC.ConnectionString = "server=REDACTED;user id=REDACTED;password=REDACTED;database=REDACTED;SslMode=none"
            'cnPC.Open()
        Catch ex As Exception

        End Try
    End Sub

It's now a one-line method, with most of the code commented out, instead of removed. Why on Earth is the method left like that?

GRH explains:

Yes, I could delete the function as it is functionally dead, but I keep it for the same reasons that a hunter mounts a deer's head above her mantle.

[Advertisement] Plan Your .NET 9 Migration with Confidence
Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!




ng

CodeSOD: A Matter of Understanding

For years, Victoria had a co-worker who "programmed by Google Search"; they didn't understand how anything worked, they simply plugged their problem into Google search and then copy/pasted and edited until they got code that worked. For this developer, I'm sure ChatGPT has been a godsend, but this code predates its wide use. It's pure "Googlesauce".

    StringBuffer stringBuffer = new StringBuffer();
    stringBuffer.append("SELECT * FROM TABLE1 WHERE COLUMN1 = 1 WITH UR");

    String sqlStr = stringBuffer.toString();
    ps = getConnection().prepareStatement(sqlStr);

    ps.setInt(1, code);

    rs = ps.executeQuery();

    while (rs.next())
    {
      count++;
    }

The core of this WTF isn't anything special- instead of running a SELECT COUNT they run a SELECT and then loop over the results to get the count. But it's all the little details in here which make it fun.

They start by using a StringBuffer to construct their query- not a horrible plan when the query is long, but this is just a single, simple, one-line query. The query contains a WITH clause, but it's in the wrong spot. Then they prepareStatement it, which does nothing, since this query doesn't contain any parameters (and also, isn't syntactically valid). Once it's prepared, they set the non-existent parameter 1 to a value- this operation will throw an exception because there are no parameters in the query.

Finally, they loop across the results to count.

The real WTF is that this code ended up in the code base, somehow. The developer said, "Yes, this seems good, I'll check in this non-functional blob that I definitely don't understand," and then there were no protections in place to keep that from happening. Now it falls to more competent developers, like Victoria, to clean up after this co-worker.

[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!




ng

CodeSOD: Counting it All

Since it's election day in the US, many people are thinking about counting today. We frequently discuss counting here, and how to do it wrong, so let's look at some code from RK.

This code may not be counting votes, but whatever it's counting, we're not going to enjoy it:

case LogMode.Row_limit: // row limit excel = 65536 rows
    if (File.Exists(personalFolder + @"" + fileName + ".CSV"))
    {
        using (StreamReader reader = new StreamReader(personalFolder + @"" + fileName + ".CSV"))
        {
            countRows = reader.ReadToEnd().Split(new char[] { '
' }).Length;
        }
    }

Now, this code is from a rather old application, originally released in 2007. So the comment about Excel's row limit really puts us in a moment in time- Excel 2007 raised the row limit to 1,000,000 rows. But older versions of Excel did cap out at 65,536. And it wasn't the case that everyone just up and switched to Excel 2007 when it came out- transitioning to the new Office file formats was a conversion which took years.

But we're not even reading an Excel file, we're reading a CSV.

I enjoy that we construct the name twice, because that's useful. But the real magic of this one is how we count the rows. Because while Excel can handle 65,536 rows at this time, I don't think this program is going to do a great job of it- because we read the entire file into memory with ReadToEnd, then Split on newlines, then count the length that way.

As you can imagine, in practice, this performed terribly on large files, of which there were many.

Unfortunately for RK, there's one rule about old, legacy code: don't touch it. So despite fixing this being a rather easy task, nobody is working on fixing it, because nobody wants to be the one who touched it last. Instead, management is promising to launch a greenfield replacement project any day now…

[Advertisement] Keep all your packages and Docker containers in one place, scan for vulnerabilities, and control who can access different feeds. ProGet installs in minutes and has a powerful free version with a lot of great features that you can upgrade when ready.Learn more.